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

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

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

Powered by Google App Engine
This is Rietveld