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

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

Issue 29334658: Issue 3587 - Use hiera_hash() to accumulate $adblockplus::users (Closed)
Patch Set: Issue 3587 - Address feedback from codereview Created Jan. 27, 2016, 3:59 p.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 | « no previous file | 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 1 # == Class: adblockplus
2 # 2 #
3 # The adblockplus class and the associated adblockplus:: namespace are 3 # The adblockplus class and the associated adblockplus:: namespace are
4 # used to integrate Puppet modules with each other, in order to assemble 4 # used to integrate Puppet modules with each other, in order to assemble
5 # the setups used by the Adblock Plus project. 5 # the setups used by the Adblock Plus project.
6 # 6 #
7 # === Parameters: 7 # === Parameters:
8 # 8 #
9 # [*users*] 9 # [*users*]
10 # A hash of adblockplus::user $name => $parameter items to set up in this 10 # A hash of adblockplus::user $name => $parameter items to set up in this
11 # context, i.e. via Hiera. 11 # context, i.e. via Hiera.
12 # 12 #
13 # === Examples: 13 # === Examples:
14 # 14 #
15 # class {'adblockplus': 15 # class {'adblockplus':
16 # users => { 16 # users => {
17 # 'pinocchio' => { 17 # 'pinocchio' => {
18 # # see adblockplus::user 18 # # see adblockplus::user
19 # }, 19 # },
20 # }, 20 # },
21 # } 21 # }
22 # 22 #
23 class adblockplus ( 23 class adblockplus (
24 $users = hiera('adblockplus::users', []), 24 $users = hiera_hash('adblockplus::users', {}),
25 ) { 25 ) {
26 26
27 # Used as internal constant within adblockplus::* resources 27 # Used as internal constant within adblockplus::* resources
28 $directory = '/var/adblockplus' 28 $directory = '/var/adblockplus'
29 29
30 # A common location for directories specific to the adblockplus:: setups, 30 # A common location for directories specific to the adblockplus:: setups,
31 # managed via Puppet, but accessible by all users with access to the system 31 # managed via Puppet, but accessible by all users with access to the system
32 @file {$directory: 32 @file {$directory:
33 ensure => 'directory', 33 ensure => 'directory',
34 mode => 0755, 34 mode => 0755,
35 owner => 'root', 35 owner => 'root',
36 } 36 }
37 37
38 # See modules/adblockplus/manifests/user.pp 38 # See modules/adblockplus/manifests/user.pp
39 create_resources('adblockplus::user', $users) 39 create_resources('adblockplus::user', $users)
40 } 40 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld