summaryrefslogtreecommitdiff
path: root/puppet/modules/site_webapp/manifests
diff options
context:
space:
mode:
authorguido <guido@bruo.org>2014-08-05 11:19:46 -0400
committerguido <guido@bruo.org>2014-08-05 12:23:15 -0400
commit66e36fc3e1c4b3482876f445372e4bc9a62c8f1f (patch)
treea57fb4115fdecbc21058f45d4ed004fcff01d7ac /puppet/modules/site_webapp/manifests
parentbe68734a93a2780578c2a54b6c90296c9fe88cbe (diff)
Fixes: #5952 Webapp now logs to it's own file instead of syslog and user.log
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' ]
+ }
+}