OLD | NEW |
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 class adblockplus { | 7 # === Parameters: |
| 8 # |
| 9 # [*users*] |
| 10 # A hash of adblockplus::user $name => $parameter items to set up in this |
| 11 # context, i.e. via Hiera. |
| 12 # |
| 13 # === Examples: |
| 14 # |
| 15 # class {'adblockplus': |
| 16 # users => { |
| 17 # 'pinocchio' => { |
| 18 # # see adblockplus::user |
| 19 # }, |
| 20 # }, |
| 21 # } |
| 22 # |
| 23 class adblockplus ( |
| 24 $users = hiera('adblockplus::users', []), |
| 25 ) { |
8 | 26 |
9 # Used as internal constant within adblockplus::* resources | 27 # Used as internal constant within adblockplus::* resources |
10 $directory = '/var/adblockplus' | 28 $directory = '/var/adblockplus' |
11 | 29 |
12 # A common location for directories specific to the adblockplus:: setups, | 30 # A common location for directories specific to the adblockplus:: setups, |
13 # 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 |
14 @file {$directory: | 32 @file {$directory: |
15 ensure => 'directory', | 33 ensure => 'directory', |
16 mode => 0755, | 34 mode => 0755, |
17 owner => 'root', | 35 owner => 'root', |
18 } | 36 } |
| 37 |
| 38 # See modules/adblockplus/manifests/user.pp |
| 39 create_resources('adblockplus::user', $users) |
19 } | 40 } |
OLD | NEW |