Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/adblockplus/manifests/puppet/master.pp

Issue 29370632: NoIssue - Refactor ensure_*state functions (Closed)
Patch Set: Created Jan. 3, 2017, 2:25 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/adblockplus/manifests/puppet/agent.pp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « modules/adblockplus/manifests/puppet/agent.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld