Rotate planet log file
Rotate the log file periodically Change-Id: I93606391a49a4475b88abec51bcc959b4d1962b6
This commit is contained in:
parent
f66eee5b29
commit
a6527c7628
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue