From d6761ce0180c2b4ac9f90e744fa34416ee68ae48 Mon Sep 17 00:00:00 2001 From: Martin Zobel-Helas Date: Mon, 11 Feb 2013 15:00:49 +0100 Subject: [PATCH] rotate some -all logfiles Signed-off-by: Martin Zobel-Helas --- .../files/syslog-ng.logrotate.loggers | 31 +++++++++++++++++++ modules/syslog-ng/manifests/init.pp | 6 ++++ 2 files changed, 37 insertions(+) create mode 100644 modules/syslog-ng/files/syslog-ng.logrotate.loggers diff --git a/modules/syslog-ng/files/syslog-ng.logrotate.loggers b/modules/syslog-ng/files/syslog-ng.logrotate.loggers new file mode 100644 index 000000000..75212cace --- /dev/null +++ b/modules/syslog-ng/files/syslog-ng.logrotate.loggers @@ -0,0 +1,31 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +/var/log/mail-all.log { + rotate 4 + weekly + missingok + notifempty + compress +} + +/var/log/syslog-all { + rotate 4 + missingok + notifempty + weekly + compress +} + +/var/log/auth-all.log { + rotate 4 + missingok + notifempty + weekly + compress + postrotate + /usr/sbin/invoke-rc.d syslog-ng reload >/dev/null + endscript +} diff --git a/modules/syslog-ng/manifests/init.pp b/modules/syslog-ng/manifests/init.pp index 94fac1c93..0e414b69c 100644 --- a/modules/syslog-ng/manifests/init.pp +++ b/modules/syslog-ng/manifests/init.pp @@ -23,4 +23,10 @@ class syslog-ng { source => 'puppet:///modules/syslog-ng/syslog-ng.logrotate', require => Package['syslog-ng'] } + if $::hostname in [lotty,lully] { + file { '/etc/logrotate.d/syslog-ng-loggers': + source => 'puppet:///modules/syslog-ng/syslog-ng.logrotate.loggers', + require => Package['syslog-ng'] + } + } } -- 2.20.1