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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 566 - (hide annotations) (download)
Thu Dec 9 12:34:33 2010 UTC (13 years, 3 months ago) by misc
File size: 2874 byte(s)
restart sympa if the configuration is changed
1 dmorgan 234 class sympa {
2 misc 562 class variable {
3     $vhost = "ml.$domain"
4     }
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     $package_list = ['sympa', 'sympa-www', 'perl-CGI-Fast',
11     'perl-Socket6']
12 misc 533
13 misc 551 package { $package_list:
14     ensure => installed;
15     }
16    
17     # sympa script start 5 differents script, I am not
18     # sure that puppet will correctly handle this
19     service { "sympa":
20     ensure => running,
21     hasstatus => true,
22 misc 566 subscribe => [ Package["sympa"], File['/etc/sympa/sympa.conf']]
23 misc 551 }
24    
25     $password = extlookup("sympa_password",'x')
26     $ldap_passwd = extlookup("sympa_ldap",'x')
27    
28     @@postgresql::user { 'sympa':
29     password => $password,
30     }
31    
32     file { '/etc/sympa/sympa.conf':
33     ensure => present,
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 => 640,
39     content => template("sympa/sympa.conf")
40     }
41    
42     file { '/etc/sympa/auth.conf':
43     ensure => present,
44     owner => root,
45     group => root,
46     mode => 644,
47     content => template("sympa/auth.conf")
48     }
49    
50    
51     include apache::mod_fcgid
52     apache::webapp_other{"sympa":
53 misc 560 webapp_file => "sympa/webapp_sympa.conf",
54 misc 551 }
55 misc 560
56 misc 562 apache::vhost_redirect_ssl { "$vhost": }
57 misc 560
58 misc 562 apache::vhost_other_app { "$vhost":
59 misc 551 vhost_file => "sympa/vhost_ml.conf",
60     }
61 misc 560
62 misc 562 openssl::self_signed_cert{ "$vhost":
63 misc 560 directory => "/etc/ssl/apache/"
64     }
65 misc 551
66 misc 560
67 misc 551 @@postgresql::database { 'sympa':
68     description => "Sympa database",
69     user => "sympa",
70     require => Postgresql::User["sympa"]
71     }
72    
73     subversion::snapshot { "/etc/sympa/web_tt2":
74     source => "svn://svn.mageia.org/svn/web/templates/sympa/trunk"
75     }
76 misc 553
77     file { "/etc/sympa/lists_xml/":
78     ensure => directory,
79     owner => root,
80     group => root,
81     mode => 755,
82     }
83 dmorgan 234 }
84 misc 557
85     define list($subject, $profile, $language = 'en') {
86    
87 misc 562 include sympa::variable
88    
89 misc 557 $xml_file = "/etc/sympa/lists_xml/$name.xml"
90    
91     file { "$xml_file":
92     owner => root,
93     group => root,
94     content => template('sympa/list.xml')
95     }
96    
97 misc 562 exec { "sympa.pl --create_list --robot=$sympa::variable::vhost --input_file=$xml_file":
98 misc 557 refreshonly => true,
99     subscribe => File["$xml_file"]
100     }
101     }
102 dmorgan 234 }
103    

  ViewVC Help
Powered by ViewVC 1.1.30