summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-02-02 17:33:38 -0800
committerelijah <elijah@riseup.net>2016-02-02 17:33:38 -0800
commitcf50f84d47fe20f72aebdad1fa0c077c350e1d00 (patch)
treea2a4bed1a550f071df9c7fcc922269f1b3582a65 /puppet
parent49c8a0c2a5ff413430b4bf7cc90f39f28c936b3e (diff)
parent45e81ca4abc81600998f11a5e74a565f545e6c84 (diff)
Merge branch 'bugfix/mxlog' into develop
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/leap/manifests/logfile.pp15
-rw-r--r--puppet/modules/leap_mx/manifests/init.pp5
-rw-r--r--puppet/modules/site_config/manifests/remove/files.pp7
3 files changed, 18 insertions, 9 deletions
diff --git a/puppet/modules/leap/manifests/logfile.pp b/puppet/modules/leap/manifests/logfile.pp
index 63dbd16b..adb3ca8a 100644
--- a/puppet/modules/leap/manifests/logfile.pp
+++ b/puppet/modules/leap/manifests/logfile.pp
@@ -1,9 +1,18 @@
#
# make syslog log to a particular file for a particular process.
#
-
-define leap::logfile($process=$name) {
- $logfile = "/var/log/leap/${name}.log"
+# arguments:
+#
+# * name: what config files are named as (eg. /etc/rsyslog.d/50-$name.conf)
+# * log: the full path of the log file (defaults to /var/log/leap/$name.log
+# * process: the syslog tag to filter on (defaults to name)
+#
+define leap::logfile($process = $name, $log = undef) {
+ if $log {
+ $logfile = $log
+ } else {
+ $logfile = "/var/log/leap/${name}.log"
+ }
rsyslog::snippet { "50-${name}":
content => template('leap/rsyslog.erb')
diff --git a/puppet/modules/leap_mx/manifests/init.pp b/puppet/modules/leap_mx/manifests/init.pp
index 50bc8a18..6bdcec42 100644
--- a/puppet/modules/leap_mx/manifests/init.pp
+++ b/puppet/modules/leap_mx/manifests/init.pp
@@ -85,7 +85,10 @@ class leap_mx {
notify => Service['leap-mx'];
}
- leap::logfile { 'mx': process => 'leap-mx' }
+ leap::logfile { 'leap-mx':
+ log => '/var/log/leap/mx.log',
+ process => 'leap-mx'
+ }
#
# LEAP-MX CODE AND DEPENDENCIES
diff --git a/puppet/modules/site_config/manifests/remove/files.pp b/puppet/modules/site_config/manifests/remove/files.pp
index 4f7aa6e6..3efcbf0f 100644
--- a/puppet/modules/site_config/manifests/remove/files.pp
+++ b/puppet/modules/site_config/manifests/remove/files.pp
@@ -15,6 +15,7 @@ class site_config::remove::files {
tidy {
'/etc/default/leap_mx':;
'/etc/logrotate.d/mx':;
+ '/etc/rsyslog.d/50-mx.conf':;
}
#
@@ -30,11 +31,7 @@ class site_config::remove::files {
'leap_mx':
path => '/var/log/',
recurse => true,
- matches => 'leap_mx*';
- 'mx':
- path => '/var/log/leap/',
- recurse => true,
- matches => 'mx.log*';
+ matches => ['leap_mx*', 'mx.log.[6-9](.gz)?', 'mx.log.[0-9][0-9](.gz)?'];
'/srv/leap/webapp/public/provider.json':;
'/srv/leap/couchdb/designs/tmp_users':
recurse => true,