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

Side by Side Diff: modules/logrotate/manifests/config.pp

Issue 29328514: Issue 3103 - Introduce type logrotate::config (Closed)
Patch Set: Created Sept. 23, 2015, 6:47 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 | « no previous file | modules/logrotate/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
(Empty)
1 # == Type: logrotate::config
2 #
3 # A shorthand wrapper that sets up a logrotate configuration file resources
4 # with the same $title, and properly configured attributes like e.g. $path.
5 #
6 # === Parameters:
7 #
8 # [*content*]
9 # Translates directly into the configuration file content.
10 # Mutually exclusive with $source.
11 #
12 # [*ensure*]
13 # Any value beside 'absent' and 'purged' will ensure the configuration
14 # file being 'present'.
15 #
16 # [*name*]
17 # The actual configuration file base name (defaults to $title).
18 #
19 # [*source*]
20 # Translates directly into the configuration file source.
21 # Mutually exclusive with $content.
22 #
23 # === Examples:
24 #
25 # logrotate::config {'gamma':
26 # ensure => 'present',
27 # source => 'puppet:///logrotate.conf',
28 # }
29 #
30 # logrotate::config {'delta':
31 # content => template('custom/logrotate.erb'),
32 # ensure => 'present',
33 # }
34 #
35 # logrotate::config {'void-alpha':
36 # ensure => 'absent',
37 # name => 'alpha',
38 # }
39 #
40 define logrotate::config (
41 $content = undef,
42 $ensure = 'present',
43 $source = undef,
Fred 2015/09/29 11:33:51 This $source parameter is not being used any furth
44 ) {
45
46 file {$title:
47 content => $content,
48 ensure => $ensure ? {
49 /^(absent|purged)$/ => 'absent',
50 default => 'present',
51 },
52 group => 'root',
53 mode => 0644,
54 owner => 'root',
55 path => "/etc/logrotate.d/$name",
56 }
57 }
OLDNEW
« no previous file with comments | « no previous file | modules/logrotate/manifests/init.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld