OLD | NEW |
1 # == Class: adblockplus::puppet::master | 1 # == Class: adblockplus::puppet::master |
2 # | 2 # |
3 # Manage Puppet (https://github.com/puppetlabs/puppet) master configuration. | 3 # Manage Puppet (https://github.com/puppetlabs/puppet) master configuration. |
4 # | 4 # |
5 # === Parameters: | 5 # === Parameters: |
6 # | 6 # |
7 # [*package*] | 7 # [*package*] |
8 # Custom parameters for the implicit Package['puppetmaster'] resource. | 8 # Custom parameters for the implicit Package['puppetmaster'] resource. |
9 # | 9 # |
10 # [*service*] | 10 # [*service*] |
(...skipping 21 matching lines...) Expand all Loading... |
32 include adblockplus::puppet | 32 include adblockplus::puppet |
33 include puppetmaster | 33 include puppetmaster |
34 include stdlib | 34 include stdlib |
35 | 35 |
36 # https://forge.puppet.com/puppetlabs/stdlib#ensure_resource | 36 # https://forge.puppet.com/puppetlabs/stdlib#ensure_resource |
37 ensure_resource('package', 'puppetmaster', merge({ | 37 ensure_resource('package', 'puppetmaster', merge({ |
38 'ensure' => $adblockplus::puppet::ensure, | 38 'ensure' => $adblockplus::puppet::ensure, |
39 }, $package)) | 39 }, $package)) |
40 | 40 |
41 # https://forge.puppet.com/puppetlabs/stdlib#getparam | 41 # https://forge.puppet.com/puppetlabs/stdlib#getparam |
42 if getparam(Package['puppet'], 'ensure') !~ /^(absent|purged)$/ { | 42 if ensure_state(Package['puppetmaster']) { |
43 | 43 |
44 ensure_resource('service', 'puppetmaster', merge({ | 44 ensure_resource('service', 'puppetmaster', merge({ |
45 'ensure' => 'running', | 45 'ensure' => 'running', |
46 'hasrestart' => true, | 46 'hasrestart' => true, |
47 'hasstatus' => true, | 47 'hasstatus' => true, |
48 }, $service)) | 48 }, $service)) |
49 | 49 |
50 Service['puppetmaster'] <- Package['puppetmaster'] | 50 Service['puppetmaster'] <- Package['puppetmaster'] |
51 } | 51 } |
52 } | 52 } |
OLD | NEW |