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

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

Issue 29483575: #2007 - Create abp::legacy::webserver class for hiera compatibility (Closed)
Patch Set: Creates a full commit for refactoring webserver manifest Created July 10, 2017, 6:29 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
OLDNEW
1 # == Class: adblockplus::log 1 # == Class: adblockplus::log
2 # 2 #
3 # Default root namespace for integrating custom logging entities. 3 # Default root namespace for integrating custom logging entities.
4 # 4 #
5 # === Parameters: 5 # === Parameters:
6 # 6 #
7 # [*ensure*] 7 # [*ensure*]
8 # Whether associated resources are ment to be 'present' or 'absent'. 8 # Whether associated resources are ment to be 'present' or 'absent'.
9 # 9 #
10 # [*name*] 10 # [*name*]
11 # Used as label to connect adblockplus::log::tracker instances to class 11 # Used as label to connect adblockplus::log::tracker instances to class
12 # adblockplus::log::forwarder, defaults to 'adblockplus::log'. 12 # adblockplus::log::forwarder, defaults to 'adblockplus::log'.
13 # 13 #
14 # [*rotations*] 14 # [*rotations*]
15 # A hash of adblockplus::log::rotation $name => $parameter items 15 # A hash of adblockplus::log::rotation $name => $parameter items
16 # to set up in this context, i.e. via Hiera. 16 # to set up in this context via Hiera only.
17 # 17 #
18 # [*trackers*] 18 # [*trackers*]
19 # A hash of adblockplus::log::rotation $title => $parameter items 19 # A hash of adblockplus::log::rotation $title => $parameter items
20 # to set up in this context, i.e. via Hiera. 20 # to set up in this context, i.e. via Hiera.
21 # 21 #
22 # === Examples: 22 # === Examples:
23 # 23 #
24 # class {'adblockplus::log': 24 # class {'adblockplus::log':
25 # rotations => { 25 # rotations => {
26 # # see adblockplus::log::rotation 26 # # see adblockplus::log::rotation
27 # }, 27 # },
28 # trackers => { 28 # trackers => {
29 # # see adblockplus::log::tracker 29 # # see adblockplus::log::tracker
30 # }, 30 # },
31 # } 31 # }
32 # 32 #
33 class adblockplus::log ( 33 class adblockplus::log (
34 $ensure = 'present', 34 $ensure = 'present',
35 $rotations = hiera('adblockplus::log::rotations', {}),
36 $trackers = hiera('adblockplus::log::trackers', {}), 35 $trackers = hiera('adblockplus::log::trackers', {}),
37 ) { 36 ) {
38 37
39 include adblockplus 38 include adblockplus
40 include stdlib 39 include stdlib
41 40
42 # Used as internal constants within adblockplus::log::* resources 41 # Used as internal constants within adblockplus::log::* resources
43 $directory = "$adblockplus::directory/log/data" 42 $directory = "$adblockplus::directory/log/data"
44 $user = 'log' 43 $user = 'log'
45 44
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 groups => [$group], 84 groups => [$group],
86 home => "$adblockplus::directory/log", 85 home => "$adblockplus::directory/log",
87 managehome => true, 86 managehome => true,
88 require => [ 87 require => [
89 File[$adblockplus::directory], 88 File[$adblockplus::directory],
90 User['fluent'], 89 User['fluent'],
91 ], 90 ],
92 } 91 }
93 92
94 # See modules/adblockplus/manifests/log/rotation.pp 93 # See modules/adblockplus/manifests/log/rotation.pp
94 $rotations = hiera_hash('adblockplus::log::rotations', {})
mathias 2017/07/12 16:13:46 Looks like an unrelated change to me, something th
f.lopez 2017/07/12 16:25:59 Agggh your are right, my mistake
95 create_resources('adblockplus::log::rotation', $rotations) 95 create_resources('adblockplus::log::rotation', $rotations)
96 96
97 # See modules/adblockplus/manifests/log/tracker.pp 97 # See modules/adblockplus/manifests/log/tracker.pp
98 create_resources('adblockplus::log::tracker', $trackers) 98 create_resources('adblockplus::log::tracker', $trackers)
99 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld