Adjust logrotate configuration to use date suffix

Change-Id: I268bf01030b2bfa5fc998d2479f90fe11212443a
Closes-bug: #1618487
This commit is contained in:
R. Berwald 2016-10-03 13:59:05 +02:00 committed by Sergii Golovatiuk
parent cf5df52ffa
commit 90419d9f8a
3 changed files with 9 additions and 1 deletions

View File

@ -65,6 +65,12 @@ class openstack::logrotate (
after => '^minsize',
}
file_line { 'logrotate-date-extension':
line => 'dateformat -%Y%m%d-%s',
match => '^dateformat ',
after => '^dateext',
}
if $debug {
$interval = '10'
} else {

View File

@ -31,7 +31,8 @@ describe 'openstack::logrotate' do
'logrotate-compress',
'logrotate-delaycompress',
'logrotate-minsize',
'logrotate-maxsize',].each do |item|
'logrotate-maxsize',
'logrotate-date-extension',].each do |item|
should contain_file_line(item)
end
should contain_cron('fuel-logrotate').with_minute('*/30')

View File

@ -49,6 +49,7 @@
notifempty
# logrotate allows to use only year, month, day and unix epoch
dateext
dateformat -%Y%m%d-%s
# number of rotated files to keep