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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.2611  
changed lines
  Added in v.2612

  ViewVC Help
Powered by ViewVC 1.1.30