Skip to content

Commit

Permalink
Merge pull request #32 from syseleven/fix_puppet_lint_issues
Browse files Browse the repository at this point in the history
Fix puppet-lint issues and bad style
  • Loading branch information
robinbowes committed Jun 8, 2016
2 parents fade33d + 0415255 commit 5d68916
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
create_resources('logrotate::conf', $custom_config)
}

}
}
25 changes: 9 additions & 16 deletions manifests/defaults.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,15 @@
}

if !defined( Logrotate::Rule['wtmp'] ) {
logrotate::rule {
'wtmp':
logrotate::rule { 'wtmp':
path => '/var/log/wtmp',
create_mode => '0664',
}
}
if !defined( Logrotate::Rule['btmp'] ) {
logrotate::rule {
'btmp':
logrotate::rule { 'btmp':
path => '/var/log/btmp',
create_mode => '0600',

}
}
}
Expand Down Expand Up @@ -93,20 +90,18 @@
}

if !defined( Logrotate::Rule['wtmp'] ) {
logrotate::rule {
'wtmp':
logrotate::rule { 'wtmp':
path => '/var/log/wtmp',
create_mode => '0664',
missingok => false,
minsize => '1M',
}
}
if !defined( Logrotate::Rule['btmp'] ) {
logrotate::rule {
'btmp':
logrotate::rule { 'btmp':
path => '/var/log/btmp',
create_mode => '0600',
minsize => '1M';
minsize => '1M',
}
}
}
Expand All @@ -127,17 +122,15 @@
}

if !defined( Logrotate::Rule['wtmp'] ) {
logrotate::rule {
'wtmp':
logrotate::rule { 'wtmp':
path => '/var/log/wtmp',
create_mode => '0664',
missingok => false;
missingok => false,
}
}

if !defined( Logrotate::Rule['btmp'] ) {
logrotate::rule {
'btmp':
logrotate::rule { 'btmp':
path => '/var/log/btmp',
create_mode => '0600',
create_group => 'root',
Expand All @@ -150,4 +143,4 @@
}
}
}
}
}
13 changes: 5 additions & 8 deletions manifests/hourly.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,18 @@
}
}

file {
'/etc/logrotate.d/hourly':
file { '/etc/logrotate.d/hourly':
ensure => $dir_ensure,
owner => 'root',
group => 'root',
mode => '0755';
'/etc/cron.hourly/logrotate':
mode => '0755',
}
file { '/etc/cron.hourly/logrotate':
ensure => $ensure,
owner => 'root',
group => 'root',
mode => '0555',
source => 'puppet:///modules/logrotate/etc/cron.hourly/logrotate',
require => [
File['/etc/logrotate.d/hourly'],
Package['logrotate'],
];
require => [ File['/etc/logrotate.d/hourly'], Package['logrotate'], ],
}
}

0 comments on commit 5d68916

Please sign in to comment.