Rotate planet log file

Rotate the log file periodically

Change-Id: I93606391a49a4475b88abec51bcc959b4d1962b6
This commit is contained in:
Ian Wienand 2017-04-03 13:42:37 +10:00
parent f66eee5b29
commit a6527c7628
1 changed files with 15 additions and 0 deletions

View File

@ -1,4 +1,6 @@
class planet {
include ::logrotate
package { 'planet-venus':
ensure => present,
}
@ -14,6 +16,19 @@ class planet {
file { '/var/log/planet':
ensure => directory,
}
logrotate::file { "${name}.log":
log => "/var/log/planet/${name}.log",
options => [
'compress',
'copytruncate',
'missingok',
'rotate 7',
'daily',
'notifempty',
],
}
}
# vim:sw=2:ts=2:expandtab:textwidth=79