1 |
dmorgan |
234 |
class sympa { |
2 |
misc |
562 |
class variable { |
3 |
|
|
$vhost = "ml.$domain" |
4 |
|
|
} |
5 |
|
|
|
6 |
|
|
class server inherits variable { |
7 |
misc |
551 |
# perl-CGI-Fast is needed for fast cgi |
8 |
|
|
# perl-Socket6 is required by perl-IO-Socket-SSL |
9 |
|
|
# (optional requirement) |
10 |
misc |
2295 |
package { ['sympa', 'sympa-www', 'perl-CGI-Fast', |
11 |
|
|
'perl-Socket6']: } |
12 |
|
|
|
13 |
misc |
551 |
# sympa script start 5 differents script, I am not |
14 |
|
|
# sure that puppet will correctly handle this |
15 |
|
|
service { "sympa": |
16 |
misc |
566 |
subscribe => [ Package["sympa"], File['/etc/sympa/sympa.conf']] |
17 |
misc |
551 |
} |
18 |
misc |
2605 |
|
19 |
misc |
624 |
$pgsql_password = extlookup("sympa_pgsql",'x') |
20 |
misc |
1397 |
$ldap_password = extlookup("sympa_ldap",'x') |
21 |
misc |
2605 |
|
22 |
misc |
1356 |
postgresql::remote_db_and_user { 'sympa': |
23 |
misc |
624 |
password => $pgsql_password, |
24 |
misc |
1356 |
description => "Sympa database", |
25 |
misc |
551 |
} |
26 |
misc |
2296 |
|
27 |
|
|
File { |
28 |
|
|
require => Package['sympa'], |
29 |
|
|
} |
30 |
|
|
|
31 |
misc |
551 |
file { '/etc/sympa/sympa.conf': |
32 |
|
|
# should be cleaner to have it root owned, but puppet do not support acl |
33 |
|
|
# and in any case, config will be reset if it change |
34 |
|
|
owner => sympa, |
35 |
|
|
group => apache, |
36 |
|
|
mode => 640, |
37 |
misc |
1967 |
content => template("sympa/sympa.conf"), |
38 |
misc |
551 |
} |
39 |
misc |
2605 |
|
40 |
misc |
551 |
file { '/etc/sympa/auth.conf': |
41 |
misc |
571 |
content => template("sympa/auth.conf"), |
42 |
misc |
1967 |
notify => Service['httpd'], |
43 |
misc |
551 |
} |
44 |
misc |
2605 |
|
45 |
|
|
|
46 |
misc |
551 |
include apache::mod_fcgid |
47 |
|
|
apache::webapp_other{"sympa": |
48 |
misc |
560 |
webapp_file => "sympa/webapp_sympa.conf", |
49 |
misc |
551 |
} |
50 |
misc |
2605 |
|
51 |
misc |
562 |
apache::vhost_redirect_ssl { "$vhost": } |
52 |
misc |
2605 |
|
53 |
boklm |
1235 |
apache::vhost_base { "$vhost": |
54 |
misc |
2295 |
use_ssl => true, |
55 |
boklm |
1235 |
content => template("sympa/vhost_ml.conf"), |
56 |
misc |
551 |
} |
57 |
misc |
2605 |
|
58 |
misc |
551 |
subversion::snapshot { "/etc/sympa/web_tt2": |
59 |
|
|
source => "svn://svn.mageia.org/svn/web/templates/sympa/trunk" |
60 |
|
|
} |
61 |
misc |
553 |
|
62 |
misc |
576 |
file { ["/etc/sympa/lists_xml/", |
63 |
misc |
578 |
"/etc/sympa/scenari/", |
64 |
misc |
576 |
"/etc/sympa/data_sources/", |
65 |
|
|
"/etc/sympa/search_filters/"]: |
66 |
misc |
553 |
ensure => directory, |
67 |
misc |
635 |
purge => true, |
68 |
|
|
recurse => true, |
69 |
|
|
force => true, |
70 |
misc |
553 |
} |
71 |
misc |
569 |
|
72 |
misc |
2299 |
file { |
73 |
|
|
"/etc/sympa/scenari/subscribe.open_web_only_notify": |
74 |
|
|
source => "puppet:///modules/sympa/scenari/open_web_only_notify"; |
75 |
|
|
"/etc/sympa/scenari/unsubscribe.open_web_only_notify": |
76 |
|
|
source => "puppet:///modules/sympa/scenari/open_web_only_notify"; |
77 |
|
|
"/etc/sympa/scenari/send.subscriber_moderated": |
78 |
|
|
source => "puppet:///modules/sympa/scenari/subscriber_moderated"; |
79 |
|
|
"/etc/sympa/scenari/create_list.forbidden": |
80 |
|
|
source => "puppet:///modules/sympa/scenari/forbidden"; |
81 |
|
|
"/etc/sympa/topics.conf": |
82 |
|
|
source => "puppet:///modules/sympa/topics.conf"; |
83 |
misc |
588 |
} |
84 |
|
|
|
85 |
misc |
576 |
define ldap_search_filter { |
86 |
misc |
604 |
file { "/etc/sympa/search_filters/$name.ldap": |
87 |
misc |
2605 |
content => template('sympa/search_filters/group.ldap') |
88 |
misc |
576 |
} |
89 |
|
|
} |
90 |
|
|
|
91 |
misc |
2605 |
# add each group that could be used in a sympa ml either as |
92 |
misc |
574 |
# - owner |
93 |
|
|
# - editor ( moderation ) |
94 |
misc |
2611 |
sympa::datasource::ldap_group { "mga-sysadmin": } |
95 |
|
|
sympa::datasource::ldap_group { "mga-ml_moderators": } |
96 |
misc |
574 |
|
97 |
misc |
576 |
|
98 |
misc |
569 |
# directory that will hold the list data |
99 |
|
|
# i am not sure of the name ( misc, 09/12/10 ) |
100 |
|
|
file { "/var/lib/sympa/expl/": |
101 |
|
|
ensure => directory, |
102 |
|
|
owner => sympa, |
103 |
|
|
} |
104 |
dmorgan |
234 |
} |
105 |
|
|
} |