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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2717 - (show annotations) (download)
Mon Apr 2 13:14:41 2012 UTC (11 years, 11 months ago) by misc
File size: 3043 byte(s)
fix manifests

1 class sympa::server {
2 include sympa::variable
3 # perl-CGI-Fast is needed for fast cgi
4 # perl-Socket6 is required by perl-IO-Socket-SSL
5 # (optional requirement)
6 package {['sympa',
7 'sympa-www',
8 'perl-CGI-Fast',
9 'perl-Socket6']: }
10
11 # sympa script start 5 differents script, I am not
12 # sure that puppet will correctly handle this
13 service { 'sympa':
14 subscribe => [ Package['sympa'], File['/etc/sympa/sympa.conf']]
15 }
16
17 $pgsql_password = extlookup('sympa_pgsql','x')
18 $ldap_password = extlookup('sympa_ldap','x')
19
20 postgresql::remote_db_and_user { 'sympa':
21 password => $pgsql_password,
22 description => 'Sympa database',
23 }
24
25 File {
26 require => Package['sympa'],
27 }
28
29 $vhost = $sympa::variable::vhost
30 file { '/etc/sympa/sympa.conf':
31 # should be cleaner to have it root owned, but puppet do not support acl
32 # and in any case, config will be reset if it change
33 owner => 'sympa',
34 group => 'apache',
35 mode => '0640',
36 content => template('sympa/sympa.conf'),
37 }
38
39 file { '/etc/sympa/auth.conf':
40 content => template('sympa/auth.conf'),
41 notify => Service['httpd'],
42 }
43
44
45 include apache::mod::fcgid
46 apache::webapp_other { 'sympa':
47 webapp_file => 'sympa/webapp_sympa.conf',
48 }
49
50 apache::vhost::redirect_ssl { $sympa::variable::vhost: }
51
52 apache::vhost::base { $sympa::variable::vhost:
53 use_ssl => true,
54 content => template('sympa/vhost_ml.conf'),
55 }
56
57 subversion::snapshot { '/etc/sympa/web_tt2':
58 source => 'svn://svn.mageia.org/svn/web/templates/sympa/trunk',
59 }
60
61 file { ['/etc/sympa/lists_xml/',
62 '/etc/sympa/scenari/',
63 '/etc/sympa/data_sources/',
64 '/etc/sympa/search_filters/']:
65 ensure => directory,
66 purge => true,
67 recurse => true,
68 force => true,
69 }
70
71 file {
72 '/etc/sympa/scenari/subscribe.open_web_only_notify':
73 source => 'puppet:///modules/sympa/scenari/open_web_only_notify';
74 '/etc/sympa/scenari/unsubscribe.open_web_only_notify':
75 source => 'puppet:///modules/sympa/scenari/open_web_only_notify';
76 '/etc/sympa/scenari/send.subscriber_moderated':
77 source => 'puppet:///modules/sympa/scenari/subscriber_moderated';
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 }

  ViewVC Help
Powered by ViewVC 1.1.30