aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sympa/manifests/init.pp
blob: 0ffabc4c3e66d97a7982d981cbeb1e1846dbcca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
class sympa {
    
    # perl-CGI-Fast is needed for fast cgi
    # perl-Socket6 is required by perl-IO-Socket-SSL
    #  (optional requirement)
    $package_list = ['sympa', 'sympa-www', 'perl-CGI-Fast',
                     'perl-Socket6']

    package { $package_list:
        ensure => installed;
    }

    # sympa script start 5 differents script, I am not
    # sure that puppet will correctly handle this
    service { "sympa":
        ensure => running,
        hasstatus => true,
        subscribe => [ Package["sympa"]]
    }

    $password = extlookup("sympa_password",'x')
    $ldap_passwd = extlookup("sympa_ldap",'x')

    @@postgresql::user { 'sympa':
        password => $password,
    }

    file { '/etc/sympa/sympa.conf':
        ensure => present,
	# should be cleaner to have it root owned, but puppet do not support acl
	# and in any case, config will be reset if it change
        owner => sympa,
        group => apache,
        mode => 640,
        content => template("sympa/sympa.conf")
    }

    file { '/etc/sympa/auth.conf':
        ensure => present,
        owner => root,
        group => root,
        mode => 644,
        content => template("sympa/auth.conf")
    }


    include apache::mod_fcgid
    apache::webapp_other{"sympa":
	webapp_file => "sympa/webapp_sympa.conf",
    }

    apache::vhost_other_app { "ml.$domain":
        vhost_file => "sympa/vhost_ml.conf",
    }

    @@postgresql::database { 'sympa':
        description => "Sympa database",
        user => "sympa",
        require => Postgresql::User["sympa"]
    }


}