1 |
misc |
154 |
|
2 |
|
|
class puppet { |
3 |
|
|
class client { |
4 |
|
|
package { puppet: |
5 |
|
|
ensure => installed |
6 |
|
|
} |
7 |
|
|
|
8 |
|
|
service { puppet: |
9 |
|
|
ensure => running, |
10 |
|
|
subscribe => [ Package[puppet], File["/etc/puppet/puppet.conf"]] |
11 |
|
|
} |
12 |
|
|
|
13 |
|
|
file { "/etc/puppet/puppet.conf": |
14 |
|
|
ensure => present, |
15 |
|
|
owner => root, |
16 |
|
|
group => root, |
17 |
|
|
mode => 644, |
18 |
|
|
content => template("puppet/puppet.conf"), |
19 |
|
|
require => Package[puppet] |
20 |
|
|
} |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
class master inherits client { |
24 |
|
|
package { puppet-server: |
25 |
|
|
ensure => installed |
26 |
|
|
} |
27 |
|
|
|
28 |
|
|
service { puppetmaster: |
29 |
|
|
ensure => running, |
30 |
|
|
path => "/etc/init.d/puppetmaster", |
31 |
|
|
subscribe => [ Package[puppet-server], File["/etc/puppet/puppet.conf"]] |
32 |
|
|
} |
33 |
misc |
156 |
|
34 |
|
|
file { "extdata": |
35 |
|
|
path => "/etc/puppet/extdata", |
36 |
|
|
ensure => directory, |
37 |
|
|
owner => puppet, |
38 |
|
|
group => puppet, |
39 |
|
|
mode => 700, |
40 |
|
|
recurse => true |
41 |
|
|
} |
42 |
misc |
202 |
|
43 |
|
|
file { '/etc/puppet/tagmail.conf': |
44 |
|
|
ensure => present, |
45 |
|
|
owner => puppet, |
46 |
|
|
group => puppet, |
47 |
|
|
mode => 700, |
48 |
|
|
content => template("puppet/tagmail.conf"), |
49 |
|
|
} |
50 |
|
|
|
51 |
misc |
154 |
} |
52 |
|
|
} |