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
This commit is contained in:
Matthew Wagoner 2012-10-08 19:52:17 -04:00 committed by Jenkins
parent b97f7ed409
commit 2786720423
2 changed files with 20 additions and 21 deletions

View File

@ -1,10 +1,10 @@
define logrotate::file($log, define logrotate::file( $log,
$options, $options,
$ensure=present, $ensure=present,
$prerotate='undef', $prerotate='undef',
$postrotate='undef', $postrotate='undef',
$firstaction='undef', $firstaction='undef',
$lastaction='undef') { $lastaction='undef') {
# $options should be an array containing 1 or more logrotate # $options should be an array containing 1 or more logrotate
# directives (e.g. missingok, compress). # directives (e.g. missingok, compress).
@ -12,11 +12,11 @@ define logrotate::file($log,
include logrotate include logrotate
file { "/etc/logrotate.d/${name}": file { "/etc/logrotate.d/${name}":
owner => root, ensure => $ensure,
group => root, owner => 'root',
mode => 644, group => 'root',
ensure => $ensure, mode => '0644',
content => template("logrotate/config.erb"), content => template('logrotate/config.erb'),
require => File["/etc/logrotate.d"], require => File['/etc/logrotate.d'],
} }
} }

View File

@ -1,16 +1,15 @@
# Adapted from http://projects.puppetlabs.com/projects/1/wiki/Logrotate_Patterns # Adapted from http://projects.puppetlabs.com/projects/1/wiki/Logrotate_Patterns
class logrotate { class logrotate {
package { 'logrotate':
package { "logrotate":
ensure => present, ensure => present,
} }
file { "/etc/logrotate.d": file { '/etc/logrotate.d':
ensure => directory, ensure => directory,
owner => root, owner => 'root',
group => root, group => 'root',
mode => 755, mode => '0755',
require => Package["logrotate"], require => Package['logrotate'],
} }
} }