15 |
service { "sympa": |
service { "sympa": |
16 |
subscribe => [ Package["sympa"], File['/etc/sympa/sympa.conf']] |
subscribe => [ Package["sympa"], File['/etc/sympa/sympa.conf']] |
17 |
} |
} |
18 |
|
|
19 |
$pgsql_password = extlookup("sympa_pgsql",'x') |
$pgsql_password = extlookup("sympa_pgsql",'x') |
20 |
$ldap_password = extlookup("sympa_ldap",'x') |
$ldap_password = extlookup("sympa_ldap",'x') |
21 |
|
|
22 |
postgresql::remote_db_and_user { 'sympa': |
postgresql::remote_db_and_user { 'sympa': |
23 |
password => $pgsql_password, |
password => $pgsql_password, |
24 |
description => "Sympa database", |
description => "Sympa database", |
36 |
mode => 640, |
mode => 640, |
37 |
content => template("sympa/sympa.conf"), |
content => template("sympa/sympa.conf"), |
38 |
} |
} |
39 |
|
|
40 |
file { '/etc/sympa/auth.conf': |
file { '/etc/sympa/auth.conf': |
41 |
content => template("sympa/auth.conf"), |
content => template("sympa/auth.conf"), |
42 |
notify => Service['httpd'], |
notify => Service['httpd'], |
43 |
} |
} |
44 |
|
|
45 |
|
|
46 |
include apache::mod_fcgid |
include apache::mod_fcgid |
47 |
apache::webapp_other{"sympa": |
apache::webapp_other{"sympa": |
48 |
webapp_file => "sympa/webapp_sympa.conf", |
webapp_file => "sympa/webapp_sympa.conf", |
49 |
} |
} |
50 |
|
|
51 |
apache::vhost_redirect_ssl { "$vhost": } |
apache::vhost_redirect_ssl { "$vhost": } |
52 |
|
|
53 |
apache::vhost_base { "$vhost": |
apache::vhost_base { "$vhost": |
54 |
use_ssl => true, |
use_ssl => true, |
55 |
content => template("sympa/vhost_ml.conf"), |
content => template("sympa/vhost_ml.conf"), |
56 |
} |
} |
57 |
|
|
58 |
subversion::snapshot { "/etc/sympa/web_tt2": |
subversion::snapshot { "/etc/sympa/web_tt2": |
59 |
source => "svn://svn.mageia.org/svn/web/templates/sympa/trunk" |
source => "svn://svn.mageia.org/svn/web/templates/sympa/trunk" |
60 |
} |
} |
84 |
|
|
85 |
define ldap_search_filter { |
define ldap_search_filter { |
86 |
file { "/etc/sympa/search_filters/$name.ldap": |
file { "/etc/sympa/search_filters/$name.ldap": |
87 |
content => template('sympa/search_filters/group.ldap') |
content => template('sympa/search_filters/group.ldap') |
88 |
} |
} |
89 |
} |
} |
90 |
|
|
91 |
define ldap_group_datasource { |
define ldap_group_datasource { |
92 |
file { "/etc/sympa/data_sources/$name.incl": |
file { "/etc/sympa/data_sources/$name.incl": |
93 |
content => template('sympa/data_sources/ldap_group.incl') |
content => template('sympa/data_sources/ldap_group.incl') |
94 |
} |
} |
95 |
} |
} |
96 |
|
|
97 |
define scenario_sender_ldap_group { |
define scenario_sender_ldap_group { |
98 |
file { "/etc/sympa/scenari/send.restricted_$name": |
file { "/etc/sympa/scenari/send.restricted_$name": |
99 |
content => template('sympa/scenari/sender.ldap_group') |
content => template('sympa/scenari/sender.ldap_group') |
100 |
} |
} |
101 |
} |
} |
102 |
|
|
103 |
define scenario_sender_email { |
define scenario_sender_email { |
104 |
$sender_email_file = regsubst($name,'\@','-at-') |
$sender_email_file = regsubst($name,'\@','-at-') |
105 |
file { "/etc/sympa/scenari/send.restricted_$sender_email_file": |
file { "/etc/sympa/scenari/send.restricted_$sender_email_file": |
106 |
content => template('sympa/scenari/sender.email') |
content => template('sympa/scenari/sender.email') |
107 |
} |
} |
108 |
} |
} |
109 |
|
|
110 |
# add each group that could be used in a sympa ml either as |
# add each group that could be used in a sympa ml either as |
111 |
# - owner |
# - owner |
112 |
# - editor ( moderation ) |
# - editor ( moderation ) |
113 |
ldap_group_datasource { "mga-sysadmin": } |
ldap_group_datasource { "mga-sysadmin": } |
122 |
} |
} |
123 |
} |
} |
124 |
|
|
125 |
define list($subject, |
define list($subject, |
126 |
$profile = false, |
$profile = false, |
127 |
$language = 'en', |
$language = 'en', |
128 |
$topics = false, |
$topics = false, |
129 |
$reply_to = false, |
$reply_to = false, |
141 |
|
|
142 |
if $sender_email { |
if $sender_email { |
143 |
$sender_email_file = regsubst($sender_email,'\@','-at-') |
$sender_email_file = regsubst($sender_email,'\@','-at-') |
144 |
} else { |
} else { |
145 |
$sender_email_file = '' |
$sender_email_file = '' |
146 |
} |
} |
147 |
|
|
148 |
file { "$xml_file": |
file { "$xml_file": |
160 |
owner => sympa, |
owner => sympa, |
161 |
group => sympa, |
group => sympa, |
162 |
mode => 750, |
mode => 750, |
163 |
content => template("sympa/config"), |
content => template("sympa/config"), |
164 |
notify => Service['sympa'], |
notify => Service['sympa'], |
165 |
} |
} |
166 |
|
|
175 |
sympa::server::scenario_sender_email { $sender_email: } |
sympa::server::scenario_sender_email { $sender_email: } |
176 |
} |
} |
177 |
} |
} |
178 |
|
|
179 |
if $subscriber_ldap_group { |
if $subscriber_ldap_group { |
180 |
if ! defined(Sympa::Server::Ldap_search_filter[$subscriber_ldap_group]) { |
if ! defined(Sympa::Server::Ldap_search_filter[$subscriber_ldap_group]) { |
181 |
sympa::server::ldap_search_filter { $subscriber_ldap_group: } |
sympa::server::ldap_search_filter { $subscriber_ldap_group: } |
216 |
} |
} |
217 |
|
|
218 |
|
|
219 |
# list where announce are sent by $email only |
# list where announce are sent by $email only |
220 |
# reply_to is set to $reply_to |
# reply_to is set to $reply_to |
221 |
define announce_list_email($subject, $reply_to, $sender_email, $language = 'en', $topics = false) { |
define announce_list_email($subject, $reply_to, $sender_email, $language = 'en', $topics = false) { |
222 |
list{ $name: |
list{ $name: |
223 |
subject => $subject, |
subject => $subject, |
266 |
topics => $topics, |
topics => $topics, |
267 |
subscriber_ldap_group => $subscriber_ldap_group, |
subscriber_ldap_group => $subscriber_ldap_group, |
268 |
sender_ldap_group => $subscriber_ldap_group, |
sender_ldap_group => $subscriber_ldap_group, |
269 |
} |
} |
270 |
} |
} |
271 |
|
|
272 |
# list with private archive, restricted to member of $ldap_group |
# list with private archive, restricted to member of $ldap_group |
281 |
public_archive => false, |
public_archive => false, |
282 |
} |
} |
283 |
} |
} |
|
|
|
|
# list with private archive, restricted to member of $ldap_group |
|
|
# everybody can post |
|
|
# used for contact alias |
|
|
define private_list_open($subject, $subscriber_ldap_group, $language ='en', $topics = false) { |
|
|
list{ $name: |
|
|
subject => $subject, |
|
|
profile => "", |
|
|
language => $language, |
|
|
topics => $topics, |
|
|
subscriber_ldap_group => $subscriber_ldap_group, |
|
|
public_archive => false, |
|
|
} |
|
|
} |
|
284 |
|
|
285 |
} |
} |
286 |
|
|