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