/[adm]/puppet/modules/sympa/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/sympa/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2691 - (show annotations) (download)
Sun Mar 25 12:47:26 2012 UTC (9 years, 6 months ago) by misc
File size: 3381 byte(s)
fix vhost invocation on several module, was missed by last commit, and add the one for redirect_ssl
1 class sympa {
2 class variable {
3 $vhost = "ml.$::domain"
4 }
5
6 class server inherits variable {
7 # perl-CGI-Fast is needed for fast cgi
8 # perl-Socket6 is required by perl-IO-Socket-SSL
9 # (optional requirement)
10 package {['sympa',
11 'sympa-www',
12 'perl-CGI-Fast',
13 'perl-Socket6']: }
14
15 # sympa script start 5 differents script, I am not
16 # sure that puppet will correctly handle this
17 service { 'sympa':
18 subscribe => [ Package['sympa'], File['/etc/sympa/sympa.conf']]
19 }
20
21 $pgsql_password = extlookup('sympa_pgsql','x')
22 $ldap_password = extlookup('sympa_ldap','x')
23
24 postgresql::remote_db_and_user { 'sympa':
25 password => $pgsql_password,
26 description => 'Sympa database',
27 }
28
29 File {
30 require => Package['sympa'],
31 }
32
33 file { '/etc/sympa/sympa.conf':
34 # 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 }
41
42 file { '/etc/sympa/auth.conf':
43 content => template('sympa/auth.conf'),
44 notify => Service['httpd'],
45 }
46
47
48 include apache::mod::fcgid
49 apache::webapp_other { 'sympa':
50 webapp_file => 'sympa/webapp_sympa.conf',
51 }
52
53 apache::vhost::redirect_ssl { $sympa::variable::vhost: }
54
55 apache::vhost::base { $sympa::variable::vhost:
56 use_ssl => true,
57 content => template('sympa/vhost_ml.conf'),
58 }
59
60 subversion::snapshot { '/etc/sympa/web_tt2':
61 source => 'svn://svn.mageia.org/svn/web/templates/sympa/trunk',
62 }
63
64 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 recurse => true,
71 force => true,
72 }
73
74 file {
75 '/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 }
86
87 # add each group that could be used in a sympa ml either as
88 # - owner
89 # - editor ( moderation )
90 sympa::datasource::ldap_group { 'mga-sysadmin': }
91 sympa::datasource::ldap_group { 'mga-ml_moderators': }
92
93
94 # directory that will hold the list data
95 # i am not sure of the name ( misc, 09/12/10 )
96 file { '/var/lib/sympa/expl/':
97 ensure => directory,
98 owner => 'sympa',
99 }
100 }
101 }

  ViewVC Help
Powered by ViewVC 1.1.28