From f30c1d1e77db52ff987e278bf17a32f5c83a6dd7 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 27 Jan 2017 14:27:02 -0200 Subject: Rotate messages.log --- files/logrotate.d/supybot | 10 ++++++++++ manifests/init.pp | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 files/logrotate.d/supybot diff --git a/files/logrotate.d/supybot b/files/logrotate.d/supybot new file mode 100644 index 0000000..4c205f4 --- /dev/null +++ b/files/logrotate.d/supybot @@ -0,0 +1,10 @@ +/var/lib/supybot/logs/messages.log { + missingok + notifempty + weekly + rotate 3 + compress + compresscmd /bin/bzip2 + compressext .bz2 + sharedscripts +} diff --git a/manifests/init.pp b/manifests/init.pp index cffa2ef..d698f29 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -31,4 +31,12 @@ class supybot { source => [ 'puppet:///modules/site_supybot/conf.d/supybot.conf', 'puppet:///modules/supybot/conf.d/supybot.conf' ], } + + file { '/etc/logrotate.d/supybot': + ensure => present, + owner => 'root', + group => 'root', + mode => '0644', + source => 'puppet:///modules/supybot/logrotate.d/supybot', + } } -- cgit v1.2.3