summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wagoner <matthew.wagoner@hp.com>2012-10-08 19:52:17 -0400
committerJenkins <jenkins@review.openstack.org>2012-10-10 21:01:08 +0000
commit27867204230dafabb24ecb4602eef7df7c2c8432 (patch)
tree92aaf96a079f02ef3a7ef6322a97718f29a8c635
parentb97f7ed409dd9b05c5dc2b7640db873d91c103c3 (diff)
style edits to puppet config files
Change-Id: I4f7314bcb1cb58f94ff7a78aebe27ec4591fc11c Reviewed-on: https://review.openstack.org/14187 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
-rw-r--r--manifests/file.pp26
-rw-r--r--manifests/init.pp15
2 files changed, 20 insertions, 21 deletions
diff --git a/manifests/file.pp b/manifests/file.pp
index 8c11c96..6286fd8 100644
--- a/manifests/file.pp
+++ b/manifests/file.pp
@@ -1,10 +1,10 @@
1define logrotate::file($log, 1define logrotate::file( $log,
2 $options, 2 $options,
3 $ensure=present, 3 $ensure=present,
4 $prerotate='undef', 4 $prerotate='undef',
5 $postrotate='undef', 5 $postrotate='undef',
6 $firstaction='undef', 6 $firstaction='undef',
7 $lastaction='undef') { 7 $lastaction='undef') {
8 8
9 # $options should be an array containing 1 or more logrotate 9 # $options should be an array containing 1 or more logrotate
10 # directives (e.g. missingok, compress). 10 # directives (e.g. missingok, compress).
@@ -12,11 +12,11 @@ define logrotate::file($log,
12 include logrotate 12 include logrotate
13 13
14 file { "/etc/logrotate.d/${name}": 14 file { "/etc/logrotate.d/${name}":
15 owner => root, 15 ensure => $ensure,
16 group => root, 16 owner => 'root',
17 mode => 644, 17 group => 'root',
18 ensure => $ensure, 18 mode => '0644',
19 content => template("logrotate/config.erb"), 19 content => template('logrotate/config.erb'),
20 require => File["/etc/logrotate.d"], 20 require => File['/etc/logrotate.d'],
21 } 21 }
22} 22}
diff --git a/manifests/init.pp b/manifests/init.pp
index 662074c..9410a27 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,16 +1,15 @@
1# Adapted from http://projects.puppetlabs.com/projects/1/wiki/Logrotate_Patterns 1# Adapted from http://projects.puppetlabs.com/projects/1/wiki/Logrotate_Patterns
2 2
3class logrotate { 3class logrotate {
4 4 package { 'logrotate':
5 package { "logrotate":
6 ensure => present, 5 ensure => present,
7 } 6 }
8 7
9 file { "/etc/logrotate.d": 8 file { '/etc/logrotate.d':
10 ensure => directory, 9 ensure => directory,
11 owner => root, 10 owner => 'root',
12 group => root, 11 group => 'root',
13 mode => 755, 12 mode => '0755',
14 require => Package["logrotate"], 13 require => Package['logrotate'],
15 } 14 }
16} 15}