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

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

Issue 29366882: Issue 3574 - Refactor Puppet class base into class adblockplus (Closed)
Patch Set: For comment 6 Created Dec. 6, 2016, 11:42 a.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 | « hiera/puppet_node_classifier.rb ('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.
12 # 11 #
13 # [*hosts*] 12 # [*hosts*]
14 # 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
15 # context, i.e. via Hiera. 14 # context, i.e. via Hiera.
16 # 15 #
17 # [*users*] 16 # [*users*]
18 # 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
19 # context, i.e. via Hiera. 18 # context, i.e. via Hiera.
20 # 19 #
21 # === Examples: 20 # === Examples:
(...skipping 15 matching lines...) Expand all
37 $authority = hiera('adblockplus::authority', 'adblockplus.org'), 36 $authority = hiera('adblockplus::authority', 'adblockplus.org'),
38 $hosts = hiera_hash('adblockplus::hosts', {}), 37 $hosts = hiera_hash('adblockplus::hosts', {}),
39 $packages = hiera_array('adblockplus::packages', []), 38 $packages = hiera_array('adblockplus::packages', []),
40 $users = hiera_hash('adblockplus::users', {}), 39 $users = hiera_hash('adblockplus::users', {}),
41 ) { 40 ) {
42 41
43 include postfix 42 include postfix
44 include ssh 43 include ssh
45 include stdlib 44 include stdlib
46 45
47 # See https://issues.adblockplus.org/ticket/3574#comment:8
48 class {'base':
49 zone => $authority,
50 }
51
52 # See https://issues.adblockplus.org/ticket/3575#comment:2 46 # See https://issues.adblockplus.org/ticket/3575#comment:2
53 class {'logrotate': 47 class {'logrotate':
54 stage => 'runtime', 48 stage => 'runtime',
55 } 49 }
56 50
57 # Class['apt'] cannot yet be configured to update on-demand 51 # Class['apt'] cannot yet be configured to update on-demand
58 class {'apt': 52 class {'apt':
59 always_apt_update => ($environment != 'development'), 53 always_apt_update => ($environment != 'development'),
60 } 54 }
61 55
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 ensure => 'present', 112 ensure => 'present',
119 mode => 0644, 113 mode => 0644,
120 }) 114 })
121 115
122 # See modules/adblockplus/manifests/host.pp 116 # See modules/adblockplus/manifests/host.pp
123 create_resources('adblockplus::host', $hosts) 117 create_resources('adblockplus::host', $hosts)
124 118
125 # See modules/adblockplus/manifests/user.pp 119 # See modules/adblockplus/manifests/user.pp
126 create_resources('adblockplus::user', $users) 120 create_resources('adblockplus::user', $users)
127 } 121 }
OLDNEW
« no previous file with comments | « hiera/puppet_node_classifier.rb ('k') | modules/base/manifests/init.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld