~mathiaz/+junk/uec-ec2-puppet-config-passenger

3 by Mathias Gug
Add initial puppet module. Provide a puppetmaster class.
1
class puppet::master {
2
    package { ["puppetmaster", 
12 by Mathias Gug
Add mod-passenger configuration.
3
               "apache2.2-common", "apache2-mpm-worker", 
4
               "libapache2-mod-passenger"]:
5
                  ensure => latest;
6
    }
3 by Mathias Gug
Add initial puppet module. Provide a puppetmaster class.
7
    service { 
8
        "puppetmaster":
9
            ensure => stopped,
12 by Mathias Gug
Add mod-passenger configuration.
10
            enable => false;
11
        "apache2":
12
            ensure => running,
3 by Mathias Gug
Add initial puppet module. Provide a puppetmaster class.
13
            enable => true;
14
    }
15
    file { [ "/etc/puppet/rack", "/etc/puppet/rack/public",
12 by Mathias Gug
Add mod-passenger configuration.
16
             "/etc/puppet/rack/tmp" ]:
17
                ensure => directory,
18
                mode => 0755,
19
                owner => root,
20
                group => root;
21
            "/etc/puppet/rack/config.ru":
22
                ensure => present,
23
                source => "puppet:///modules/puppet/config.ru",
24
                mode => 0644,
25
                owner => puppet,
26
                group => root,
27
                require => File["/etc/puppet/rack"];
28
            "/etc/apache2/mods-enabled/ssl.load":
29
                ensure => "../mods-available/ssl.load",
30
                notify => Service["apache2"],
31
                require => Package["apache2.2-common"];
32
            "/etc/apache2/mods-enabled/ssl.conf":
33
                ensure => "../mods-available/ssl.conf",
34
                notify => Service["apache2"],
35
                require => Package["apache2.2-common"];
36
            "/etc/apache2/sites-available/puppetmasterd":
37
                ensure => present,
38
                content => template("puppet/apache2.conf"),
39
                mode => 0644,
40
                owner => root,
41
                group => root,
42
                require => [ File["/etc/puppet/rack/config.ru"], 
43
                             File["/etc/puppet/rack/public"],
44
                             File["/etc/puppet/rack/tmp"],
45
                             File["/etc/apache2/mods-enabled/ssl.load"],
46
                             File["/etc/apache2/mods-enabled/ssl.conf"],
47
                             Package["libapache2-mod-passenger"],
48
                           ],
16 by Mathias Gug
Revert ports configuration.
49
                notify => Service["apache2"];
50
            "/etc/apache2/sites-enabled/puppetmasterd":
12 by Mathias Gug
Add mod-passenger configuration.
51
                ensure => "../sites-available/puppetmasterd",
52
                require => [ Package["apache2.2-common"],
53
                             File["/etc/apache2/sites-available/puppetmasterd"],
54
                           ],
55
                notify => Service["apache2"];
56
            "/etc/apache2/ports.conf":
16 by Mathias Gug
Revert ports configuration.
57
                ensure => present,
58
                source => "puppet:///modules/puppet/ports.conf",
59
                mode => 0644,
60
                owner => root,
61
                group => root,
62
                require => Package["apache2.2-common"],
63
                notify => Service["apache2"];
64
            "/etc/apache2/sites-enabled/000-default":
12 by Mathias Gug
Add mod-passenger configuration.
65
                ensure => absent,
66
                require => Package["apache2.2-common"],
67
                notify => Service["apache2"];
68
    }
69
}
3 by Mathias Gug
Add initial puppet module. Provide a puppetmaster class.
70