commit f9cee21f9c2d7222e0264fec481cde8e5df0d49f
Author: Xavier Lamien <laxathom(a)lxtnow.net>
Date: Sun Sep 1 13:59:56 2013 +0200
Add logrotate to plague-server.
modules/plague/files/plague-server.logrotate | 12 ++++++++++++
modules/plague/manifests/server.pp | 5 +++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/modules/plague/files/plague-server.logrotate
b/modules/plague/files/plague-server.logrotate
new file mode 100644
index 0000000..33b506f
--- /dev/null
+++ b/modules/plague/files/plague-server.logrotate
@@ -0,0 +1,12 @@
+/var/log/plague-server.log {
+ daily
+ count 5
+ size 100M
+ missingok
+ notifempty
+ sharedscripts
+ postrotate
+ /sbin/service plague-server restart > /dev/null 2>&1 || :
+ endscript
+ compress
+}
diff --git a/modules/plague/manifests/server.pp b/modules/plague/manifests/server.pp
index e7f8537..c5ebd06 100644
--- a/modules/plague/manifests/server.pp
+++ b/modules/plague/manifests/server.pp
@@ -49,4 +49,9 @@ class plague::server {
mode => 0644,
notify => Service['plague-server']
}
+
+ file { '/etc/logrotate.d/plague-server':
+ source => 'puppet:///plague/plague-server.logrotate',
+ ensure => present,
+ }
}