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

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

Issue 29481697: Noissue - Merge packages variable correctly of all hiera scopes in adblockplus module (Closed)
Patch Set: Created July 6, 2017, 8:01 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*] 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 # 11 #
12 # [*hosts*] 12 # [*hosts*]
13 # A hash of adblockplus::host $name => $parameter items to set up in this 13 # A hash of adblockplus::host $name => $parameter items to set up in this
14 # context, i.e. via Hiera. 14 # context, i.e. via Hiera.
15 # 15 #
16 # [*users*] 16 # [*users*]
17 # A hash of adblockplus::user $name => $parameter items to set up in this 17 # A hash of adblockplus::user $name => $parameter items to set up in this
18 # context, i.e. via Hiera. 18 # context, i.e. via Hiera.
19 # 19 #
20 # [*packages*] 20 # [*packages*]
21 # An array of adblockplus::packages items to set up in this context, 21 # An array of adblockplus::packages items to set up in this context,
22 # i.e. via Hiera. 22 # via Hiera, exclusively.
23 # 23 #
24 # === Examples: 24 # === Examples:
25 # 25 #
26 # class {'adblockplus': 26 # class {'adblockplus':
27 # hosts => { 27 # hosts => {
28 # 'node1' => { 28 # 'node1' => {
29 # # see adblockplus::host 29 # # see adblockplus::host
30 # }, 30 # },
31 # }, 31 # },
32 # users => { 32 # users => {
33 # 'pinocchio' => { 33 # 'pinocchio' => {
34 # # see adblockplus::user 34 # # see adblockplus::user
35 # }, 35 # },
36 # }, 36 # },
37 # } 37 # }
38 # 38 #
39 class adblockplus ( 39 class adblockplus (
40 $authority = hiera('adblockplus::authority', 'adblockplus.org'), 40 $authority = hiera('adblockplus::authority', 'adblockplus.org'),
41 $hosts = hiera_hash('adblockplus::hosts', {}), 41 $hosts = hiera_hash('adblockplus::hosts', {}),
42 $packages = hiera_array('adblockplus::packages', []),
43 $users = hiera_hash('adblockplus::users', {}), 42 $users = hiera_hash('adblockplus::users', {}),
44 ) { 43 ) {
45 44
46 include adblockplus::legacy 45 include adblockplus::legacy
47 include postfix 46 include postfix
48 include ssh 47 include ssh
49 include stdlib 48 include stdlib
50 49
51 # See https://issues.adblockplus.org/ticket/3575#comment:2 50 # See https://issues.adblockplus.org/ticket/3575#comment:2
52 class {'logrotate': 51 class {'logrotate':
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 '/etc/ssh/ssh_host_rsa_key.pub': 107 '/etc/ssh/ssh_host_rsa_key.pub':
109 source => 'puppet:///modules/adblockplus/development_host_rsa_key.pub', 108 source => 'puppet:///modules/adblockplus/development_host_rsa_key.pub',
110 mode => '0644', 109 mode => '0644',
111 } 110 }
112 } 111 }
113 112
114 # Fix implicit package dependency Class['apt'] does not properly handle 113 # Fix implicit package dependency Class['apt'] does not properly handle
115 Exec['apt_update'] -> Package<|title != 'python-software-properties'|> 114 Exec['apt_update'] -> Package<|title != 'python-software-properties'|>
116 115
117 # https://issues.adblockplus.org/ticket/3574#comment:19 116 # https://issues.adblockplus.org/ticket/3574#comment:19
117 $packages = hiera_array('adblockplus::packages', []),
118 ensure_packages($packages) 118 ensure_packages($packages)
119 119
120 # https://projects.puppetlabs.com/issues/4145 120 # https://projects.puppetlabs.com/issues/4145
121 ensure_resource('file', '/etc/ssh/ssh_known_hosts', { 121 ensure_resource('file', '/etc/ssh/ssh_known_hosts', {
122 ensure => 'present', 122 ensure => 'present',
123 mode => '0644', 123 mode => '0644',
124 }) 124 })
125 125
126 # See modules/adblockplus/manifests/host.pp 126 # See modules/adblockplus/manifests/host.pp
127 create_resources('adblockplus::host', $hosts) 127 create_resources('adblockplus::host', $hosts)
128 128
129 # See modules/adblockplus/manifests/user.pp 129 # See modules/adblockplus/manifests/user.pp
130 create_resources('adblockplus::user', $users) 130 create_resources('adblockplus::user', $users)
131 } 131 }
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