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

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

Issue 29367556: Issue 3065 - Refactor adblockplus::puppet module to include Puppet patches (Closed)
Patch Set: (remove accidental changes) Created Dec. 15, 2016, 10 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') | modules/private-stub/hiera/base.yaml » ('j') | 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 11 matching lines...) Expand all
22 # 'ensure' => 'running', 22 # 'ensure' => 'running',
23 # 'name' => 'puppetmaster', 23 # 'name' => 'puppetmaster',
24 # }, 24 # },
25 # } 25 # }
26 # 26 #
27 class adblockplus::puppet::master ( 27 class adblockplus::puppet::master (
28 $package = hiera('adblockplus::puppet::master::package', {}), 28 $package = hiera('adblockplus::puppet::master::package', {}),
29 $service = hiera('adblockplus::puppet::master::service', {}), 29 $service = hiera('adblockplus::puppet::master::service', {}),
30 ) { 30 ) {
31 31
32 include adblockplus 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', $package) 37 ensure_resource('package', 'puppetmaster', merge({
38 'ensure' => $adblockplus::puppet::ensure,
39 }, $package))
38 40
39 # https://forge.puppet.com/puppetlabs/stdlib#getparam 41 # https://forge.puppet.com/puppetlabs/stdlib#getparam
40 if getparam(Package['puppet'], 'ensure') !~ /^(absent|purged)$/ { 42 if getparam(Package['puppet'], 'ensure') !~ /^(absent|purged)$/ {
41 43
42 ensure_resource('service', 'puppetmaster', merge({ 44 ensure_resource('service', 'puppetmaster', merge({
43 'ensure' => 'running', 45 'ensure' => 'running',
44 'hasrestart' => true, 46 'hasrestart' => true,
45 'hasstatus' => true, 47 'hasstatus' => true,
46 }, $service)) 48 }, $service))
47 49
48 Service['puppetmaster'] <- Package['puppetmaster'] 50 Service['puppetmaster'] <- Package['puppetmaster']
49 } 51 }
50 } 52 }
OLDNEW
« no previous file with comments | « modules/adblockplus/manifests/puppet/agent.pp ('k') | modules/private-stub/hiera/base.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld