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