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

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

Issue 29333281: Issue 3307 - Introduce class adblockplus::log::rotation (Closed)
Patch Set: Created Jan. 7, 2016, 1:14 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 | modules/adblockplus/manifests/log/rotation.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::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 class adblockplus::log { 5 # === Parameters:
6 #
7 # [*rotations*]
8 # A hash of adblockplus::log::rotation $name => $parameter items
9 # to set up in this context, i.e. via Hiera.
10 #
11 # === Examples:
12 #
13 # class {'adblockplus::log':
14 # rotations => {
15 # # see adblockplus::log::rotation
16 # },
17 # }
18 #
19 class adblockplus::log (
20 $rotations = hiera('adblockplus::log::rotations', {}),
21 ) {
6 22
7 include adblockplus 23 include adblockplus
8 realize(File[$adblockplus::directory]) 24 realize(File[$adblockplus::directory])
9 25
10 # Used as internal constants within adblockplus::log::* resources 26 # Used as internal constants within adblockplus::log::* resources
11 $directory = "$adblockplus::directory/log" 27 $directory = "$adblockplus::directory/log"
12 $group = 'log' 28 $group = 'log'
13 $user = 'log' 29 $user = 'log'
14 30
15 # Invoke realize(File[$adblockplus::log::directory]) when neccessary 31 # Invoke realize(File[$adblockplus::log::directory]) when neccessary
16 @file {$directory: 32 @file {$directory:
17 ensure => 'directory', 33 ensure => 'directory',
18 require => File[$adblockplus::directory], 34 require => File[$adblockplus::directory],
19 } 35 }
20 36
21 # Invoke realize(User[$adblockplus::log::user]) when necessary 37 # Invoke realize(User[$adblockplus::log::user]) when necessary
22 @user {$user: 38 @user {$user:
23 ensure => 'present', 39 ensure => 'present',
24 managehome => true, 40 managehome => true,
25 } 41 }
42
43 # See modules/adblockplus/manifests/log/rotation.pp
44 create_resources('adblockplus::log::rotation', $rotations)
26 } 45 }
OLDNEW
« no previous file with comments | « no previous file | modules/adblockplus/manifests/log/rotation.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld