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

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

Issue 29469584: #1634 - Update file resource syntax in module adblockplus (Closed)
Patch Set: Created June 21, 2017, 10:15 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/log.pp ('k') | modules/adblockplus/manifests/sudo.pp » ('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 1 # == Class: adblockplus::puppet
2 # 2 #
3 # Manage Puppet (https://github.com/puppetlabs/puppet) resources. 3 # Manage Puppet (https://github.com/puppetlabs/puppet) resources.
4 # 4 #
5 # === Parameters: 5 # === Parameters:
6 # 6 #
7 # [*ensure*] 7 # [*ensure*]
8 # General target policy for Puppet resources, supported values include 8 # General target policy for Puppet resources, supported values include
9 # "present", "latest", "absent" and "purged". 9 # "present", "latest", "absent" and "purged".
10 # 10 #
11 # === Examples: 11 # === Examples:
12 # 12 #
13 # class {'adblockplus::puppet': 13 # class {'adblockplus::puppet':
14 # ensure => 'latest', 14 # ensure => 'latest',
15 # } 15 # }
16 # 16 #
17 class adblockplus::puppet ( 17 class adblockplus::puppet (
18 $ensure = 'present', 18 $ensure = 'present',
19 ) { 19 ) {
20 20
21 # https://forge.puppet.com/puppetlabs/stdlib 21 # https://forge.puppet.com/puppetlabs/stdlib
22 include stdlib 22 include stdlib
23 23
24 # https://tickets.puppetlabs.com/browse/PUP-3655 24 # https://tickets.puppetlabs.com/browse/PUP-3655
25 ensure_resource('file', '/var/lib/puppet/facts.d', { 25 ensure_resource('file', '/var/lib/puppet/facts.d', {
26 ensure => ensure_directory_state($ensure), 26 ensure => ensure_directory_state($ensure),
27 group => 'root', 27 group => 'root',
28 mode => 0755, 28 mode => '0755',
29 owner => 'root', 29 owner => 'root',
30 }) 30 })
31 31
32 # http://stackoverflow.com/questions/22816946/ 32 # http://stackoverflow.com/questions/22816946/
33 ensure_resource('file', '/var/lib/puppet/facts.d/pup3665', { 33 ensure_resource('file', '/var/lib/puppet/facts.d/pup3665', {
34 'content' => "#!/bin/sh\necho 'pup3665=workaround'\n\n", 34 'content' => "#!/bin/sh\necho 'pup3665=workaround'\n\n",
35 'ensure' => ensure_file_state($ensure), 35 'ensure' => ensure_file_state($ensure),
36 'group' => 'root', 36 'group' => 'root',
37 'mode' => 0755, 37 'mode' => '0755',
38 'owner' => 'root', 38 'owner' => 'root',
39 }) 39 })
40 40
41 File['/var/lib/puppet/facts.d'] -> File['/var/lib/puppet/facts.d/pup3665'] 41 File['/var/lib/puppet/facts.d'] -> File['/var/lib/puppet/facts.d/pup3665']
42 } 42 }
OLDNEW
« no previous file with comments | « modules/adblockplus/manifests/log.pp ('k') | modules/adblockplus/manifests/sudo.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld