aboutsummaryrefslogtreecommitdiffstats
path: root/modules/puppet/manifests/init.pp
blob: 2451a10c504c786ebbe9f439b6d8f5a464edcd08 (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

class puppet {
    class client {
        package { puppet:
            ensure => installed
        }
    
        service { puppet:
            ensure => running,
            subscribe => [ Package[puppet], File["/etc/puppet/puppet.conf"]]
        }

        file { "/etc/puppet/puppet.conf":
            ensure => present,
            owner => root,
            group => root,
            mode => 644,
            content => template("puppet/puppet.conf"),
            require => Package[puppet]
        }
    }

    class master inherits client {
        package { puppet-server:
            ensure => installed
        }
    
        service { puppetmaster:
            ensure => running,
            path => "/etc/init.d/puppetmaster",
            subscribe => [ Package[puppet-server], File["/etc/puppet/puppet.conf"]]
        }
    }
}