7 |
# perl-CGI-Fast is needed for fast cgi |
# perl-CGI-Fast is needed for fast cgi |
8 |
# perl-Socket6 is required by perl-IO-Socket-SSL |
# perl-Socket6 is required by perl-IO-Socket-SSL |
9 |
# (optional requirement) |
# (optional requirement) |
10 |
$package_list = ['sympa', 'sympa-www', 'perl-CGI-Fast', |
package { ['sympa', 'sympa-www', 'perl-CGI-Fast', |
11 |
'perl-Socket6'] |
'perl-Socket6']: } |
12 |
|
|
|
package { $package_list: |
|
|
ensure => installed; |
|
|
} |
|
|
|
|
13 |
# sympa script start 5 differents script, I am not |
# sympa script start 5 differents script, I am not |
14 |
# sure that puppet will correctly handle this |
# sure that puppet will correctly handle this |
15 |
service { "sympa": |
service { "sympa": |
|
ensure => running, |
|
|
hasstatus => true, |
|
16 |
subscribe => [ Package["sympa"], File['/etc/sympa/sympa.conf']] |
subscribe => [ Package["sympa"], File['/etc/sympa/sympa.conf']] |
17 |
} |
} |
18 |
|
|
25 |
} |
} |
26 |
|
|
27 |
file { '/etc/sympa/sympa.conf': |
file { '/etc/sympa/sympa.conf': |
|
ensure => present, |
|
28 |
# should be cleaner to have it root owned, but puppet do not support acl |
# should be cleaner to have it root owned, but puppet do not support acl |
29 |
# and in any case, config will be reset if it change |
# and in any case, config will be reset if it change |
30 |
owner => sympa, |
owner => sympa, |
35 |
} |
} |
36 |
|
|
37 |
file { '/etc/sympa/auth.conf': |
file { '/etc/sympa/auth.conf': |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
|
mode => 644, |
|
38 |
content => template("sympa/auth.conf"), |
content => template("sympa/auth.conf"), |
39 |
require => Package[sympa], |
require => Package[sympa], |
40 |
notify => Service['httpd'], |
notify => Service['httpd'], |
49 |
apache::vhost_redirect_ssl { "$vhost": } |
apache::vhost_redirect_ssl { "$vhost": } |
50 |
|
|
51 |
apache::vhost_base { "$vhost": |
apache::vhost_base { "$vhost": |
52 |
use_ssl => true, |
use_ssl => true, |
53 |
content => template("sympa/vhost_ml.conf"), |
content => template("sympa/vhost_ml.conf"), |
54 |
} |
} |
55 |
|
|
62 |
"/etc/sympa/data_sources/", |
"/etc/sympa/data_sources/", |
63 |
"/etc/sympa/search_filters/"]: |
"/etc/sympa/search_filters/"]: |
64 |
ensure => directory, |
ensure => directory, |
|
owner => root, |
|
|
group => root, |
|
|
mode => 755, |
|
65 |
purge => true, |
purge => true, |
66 |
recurse => true, |
recurse => true, |
67 |
force => true, |
force => true, |
70 |
|
|
71 |
file { ["/etc/sympa/scenari/subscribe.open_web_only_notify", |
file { ["/etc/sympa/scenari/subscribe.open_web_only_notify", |
72 |
"/etc/sympa/scenari/unsubscribe.open_web_only_notify"]: |
"/etc/sympa/scenari/unsubscribe.open_web_only_notify"]: |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
73 |
mode => 755, |
mode => 755, |
74 |
source => "puppet:///modules/sympa/scenari/open_web_only_notify", |
source => "puppet:///modules/sympa/scenari/open_web_only_notify", |
75 |
} |
} |
76 |
|
|
77 |
file { ["/etc/sympa/scenari/send.subscriber_moderated"]: |
file { ["/etc/sympa/scenari/send.subscriber_moderated"]: |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
78 |
mode => 755, |
mode => 755, |
79 |
source => "puppet:///modules/sympa/scenari/subscriber_moderated", |
source => "puppet:///modules/sympa/scenari/subscriber_moderated", |
80 |
} |
} |
81 |
|
|
82 |
file { ["/etc/sympa/scenari/create_list.forbidden"]: |
file { ["/etc/sympa/scenari/create_list.forbidden"]: |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
83 |
mode => 755, |
mode => 755, |
84 |
source => "puppet:///modules/sympa/scenari/forbidden", |
source => "puppet:///modules/sympa/scenari/forbidden", |
85 |
} |
} |
86 |
|
|
87 |
|
|
88 |
file { ["/etc/sympa/topics.conf"]: |
file { ["/etc/sympa/topics.conf"]: |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
89 |
mode => 755, |
mode => 755, |
90 |
source => "puppet:///modules/sympa/topics.conf", |
source => "puppet:///modules/sympa/topics.conf", |
91 |
require => Package[sympa], |
require => Package[sympa], |
93 |
|
|
94 |
define ldap_search_filter { |
define ldap_search_filter { |
95 |
file { "/etc/sympa/search_filters/$name.ldap": |
file { "/etc/sympa/search_filters/$name.ldap": |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
96 |
mode => 755, |
mode => 755, |
97 |
content => template('sympa/search_filters/group.ldap') |
content => template('sympa/search_filters/group.ldap') |
98 |
} |
} |
100 |
|
|
101 |
define ldap_group_datasource { |
define ldap_group_datasource { |
102 |
file { "/etc/sympa/data_sources/$name.incl": |
file { "/etc/sympa/data_sources/$name.incl": |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
103 |
mode => 755, |
mode => 755, |
104 |
content => template('sympa/data_sources/ldap_group.incl') |
content => template('sympa/data_sources/ldap_group.incl') |
105 |
} |
} |
107 |
|
|
108 |
define scenario_sender_ldap_group { |
define scenario_sender_ldap_group { |
109 |
file { "/etc/sympa/scenari/send.restricted_$name": |
file { "/etc/sympa/scenari/send.restricted_$name": |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
110 |
mode => 755, |
mode => 755, |
111 |
content => template('sympa/scenari/sender.ldap_group') |
content => template('sympa/scenari/sender.ldap_group') |
112 |
} |
} |
115 |
define scenario_sender_email { |
define scenario_sender_email { |
116 |
$sender_email_file = regsubst($name,'\@','-at-') |
$sender_email_file = regsubst($name,'\@','-at-') |
117 |
file { "/etc/sympa/scenari/send.restricted_$sender_email_file": |
file { "/etc/sympa/scenari/send.restricted_$sender_email_file": |
|
ensure => present, |
|
|
owner => root, |
|
|
group => root, |
|
118 |
mode => 755, |
mode => 755, |
119 |
content => template('sympa/scenari/sender.email') |
content => template('sympa/scenari/sender.email') |
120 |
} |
} |
132 |
file { "/var/lib/sympa/expl/": |
file { "/var/lib/sympa/expl/": |
133 |
ensure => directory, |
ensure => directory, |
134 |
owner => sympa, |
owner => sympa, |
|
group => root, |
|
|
mode => 755, |
|
135 |
require => Package[sympa], |
require => Package[sympa], |
136 |
} |
} |
137 |
} |
} |
160 |
} |
} |
161 |
|
|
162 |
file { "$xml_file": |
file { "$xml_file": |
|
owner => root, |
|
|
group => root, |
|
163 |
content => template('sympa/list.xml'), |
content => template('sympa/list.xml'), |
164 |
require => Package[sympa], |
require => Package[sympa], |
165 |
} |
} |
171 |
} |
} |
172 |
|
|
173 |
file { "/var/lib/sympa/expl/$name/config": |
file { "/var/lib/sympa/expl/$name/config": |
|
ensure => present, |
|
174 |
owner => sympa, |
owner => sympa, |
175 |
group => sympa, |
group => sympa, |
176 |
mode => 750, |
mode => 750, |