]> gitweb.fluxo.info Git - puppet-supybot.git/commitdiff
Rotate messages.log
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 27 Jan 2017 16:27:02 +0000 (14:27 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 27 Jan 2017 16:27:02 +0000 (14:27 -0200)
files/logrotate.d/supybot [new file with mode: 0644]
manifests/init.pp

diff --git a/files/logrotate.d/supybot b/files/logrotate.d/supybot
new file mode 100644 (file)
index 0000000..4c205f4
--- /dev/null
@@ -0,0 +1,10 @@
+/var/lib/supybot/logs/messages.log {
+    missingok
+    notifempty
+    weekly
+    rotate 3
+    compress
+    compresscmd /bin/bzip2
+    compressext .bz2
+    sharedscripts
+}
index cffa2ef450dc04112e7c5a8eae8efe0dda40f5c5..d698f290b1818aa5aad0d58db38ac44cb4c4ebb2 100644 (file)
@@ -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',
+  }
 }