summaryrefslogtreecommitdiff
path: root/puppet/modules/site_webapp/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_webapp/manifests')
-rw-r--r--puppet/modules/site_webapp/manifests/init.pp1
-rw-r--r--puppet/modules/site_webapp/manifests/logging.pp16
2 files changed, 17 insertions, 0 deletions
diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp
index d6f1d7ae..7fdd0c3f 100644
--- a/puppet/modules/site_webapp/manifests/init.pp
+++ b/puppet/modules/site_webapp/manifests/init.pp
@@ -16,6 +16,7 @@ class site_webapp {
include site_config::ruby::dev
include site_webapp::apache
include site_webapp::couchdb
+ include site_webapp::logging
include site_haproxy
include site_webapp::cron
include site_config::x509::cert
diff --git a/puppet/modules/site_webapp/manifests/logging.pp b/puppet/modules/site_webapp/manifests/logging.pp
new file mode 100644
index 00000000..441c5792
--- /dev/null
+++ b/puppet/modules/site_webapp/manifests/logging.pp
@@ -0,0 +1,16 @@
+class site_webapp::logging {
+
+ rsyslog::snippet { '01-webapp':
+ content => 'if $programname == "webapp" then /var/log/leap/webapp.log
+stop'
+ }
+
+ augeas {
+ 'logrotate_webapp':
+ context => '/files/etc/logrotate.d/webapp/rule',
+ changes => [ 'set file /var/log/leap/webapp.log', 'set rotate 7',
+ 'set schedule daily', 'set compress compress',
+ 'set missingok missingok', 'set ifempty notifempty',
+ 'set copytruncate copytruncate' ]
+ }
+}