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

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

Issue 29335885: Issue 3574 - Introduce parameter $adblockplus::authority (Closed)
Patch Set: Created Feb. 7, 2016, 6:56 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 # [*authority*]
10 # The authorative domain or zone associated with the current environment,
11 # similar to the deprecated and soon to be removed $base::zone.
12 #
9 # [*users*] 13 # [*users*]
10 # A hash of adblockplus::user $name => $parameter items to set up in this 14 # A hash of adblockplus::user $name => $parameter items to set up in this
11 # context, i.e. via Hiera. 15 # context, i.e. via Hiera.
12 # 16 #
13 # === Examples: 17 # === Examples:
14 # 18 #
15 # class {'adblockplus': 19 # class {'adblockplus':
16 # users => { 20 # users => {
17 # 'pinocchio' => { 21 # 'pinocchio' => {
18 # # see adblockplus::user 22 # # see adblockplus::user
19 # }, 23 # },
20 # }, 24 # },
21 # } 25 # }
22 # 26 #
23 class adblockplus ( 27 class adblockplus (
28 $authority = hiera('adblockplus::authority', 'adblockplus.org'),
24 $users = hiera_hash('adblockplus::users', {}), 29 $users = hiera_hash('adblockplus::users', {}),
25 ) { 30 ) {
26 31
27 # See https://issues.adblockplus.org/ticket/3574#comment:4 32 # See https://issues.adblockplus.org/ticket/3574#comment:8
28 include base 33 class {'base':
34 zone => $authority,
35 }
29 36
30 # Used as internal constant within adblockplus::* resources 37 # Used as internal constant within adblockplus::* resources
31 $directory = '/var/adblockplus' 38 $directory = '/var/adblockplus'
32 39
33 # A common location for directories specific to the adblockplus:: setups, 40 # A common location for directories specific to the adblockplus:: setups,
34 # managed via Puppet, but accessible by all users with access to the system 41 # managed via Puppet, but accessible by all users with access to the system
35 @file {$directory: 42 @file {$directory:
36 ensure => 'directory', 43 ensure => 'directory',
37 mode => 0755, 44 mode => 0755,
38 owner => 'root', 45 owner => 'root',
39 } 46 }
40 47
41 # See modules/adblockplus/manifests/user.pp 48 # See modules/adblockplus/manifests/user.pp
42 create_resources('adblockplus::user', $users) 49 create_resources('adblockplus::user', $users)
43 } 50 }
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