Skip to content

Commit

Permalink
[EOPS-6067] manually add in fixes from rodjek#32
Browse files Browse the repository at this point in the history
  • Loading branch information
rmnwolf committed Jul 9, 2014
1 parent 7914e9a commit af0b6f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
'/etc/logrotate.conf':
ensure => file,
mode => '0444',
source => 'puppet:///modules/logrotate/etc/logrotate.conf';
content => template('logrotate/etc/logrotate.conf.erb');
'/etc/logrotate.d':
ensure => directory,
backup => $backup,
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0444',
'source' => 'puppet:///modules/logrotate/etc/logrotate.conf',
'content' => /# THIS FILE IS AUTOMATICALLY DISTRIBUTED BY PUPPET. ANY CHANGES WILL BE/,
'require' => 'Package[logrotate]',
})

Expand Down
6 changes: 6 additions & 0 deletions files/etc/logrotate.conf → templates/etc/logrotate.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# rotate log files weekly
weekly

<% if @lsbmajdistrelease and (scope.function_versioncmp([@lsbmajdistrelease, '14']) >= 0) -%>
# use the syslog group by default, since this is the owning group
# # of /var/log/syslog.
su root syslog
<%- end -%>

# keep 4 weeks worth of backlogs
rotate 4

Expand Down

0 comments on commit af0b6f9

Please sign in to comment.