summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorYasser Nabi <yassersaleemi@gmail.com>2014-07-07 13:30:14 +0100
committerYasser Nabi <yassersaleemi@gmail.com>2014-07-10 17:14:27 +0100
commit3b49f0c389e04971e1a3623e731e588b7fadb2d1 (patch)
tree18e370eb4277197efe88b32da314f90ce8102a83 /templates
parent67c7c501b916ebd1a27a8a218d49602339526c4f (diff)
Add parameter 'v8plus' for rsyslog version 8+
There has been some significant config changes in versions 8+ of Rsyslog, one of which is causing deprecated warnings with the Puppet module. This commit adds are class boolean parameter 'v8plus' to signify if the version of Rsyslog is version 8 or greater. Also, the deprecation warning is fixed (correct syntax is used).
Diffstat (limited to 'templates')
-rw-r--r--templates/client.conf.erb6
-rw-r--r--templates/rsyslog.conf.erb4
2 files changed, 9 insertions, 1 deletions
diff --git a/templates/client.conf.erb b/templates/client.conf.erb
index bb40627..9dc5083 100644
--- a/templates/client.conf.erb
+++ b/templates/client.conf.erb
@@ -165,7 +165,11 @@ mail.* -/var/log/maillog
cron.* /var/log/cron
# Everybody gets emergency messages
-*.emerg *
+<% if scope.lookupvar('rsyslog::v8plus') == true -%>
+*.emerg :omusrmsg:*
+<% else -%>
+*.emerg *
+<% end -%>
# Save news errors of level crit and higher in a special file.
uucp,news.crit -/var/log/spooler
diff --git a/templates/rsyslog.conf.erb b/templates/rsyslog.conf.erb
index 097df0c..0339ef9 100644
--- a/templates/rsyslog.conf.erb
+++ b/templates/rsyslog.conf.erb
@@ -35,4 +35,8 @@ $IncludeConfig <%= scope.lookupvar('rsyslog::rsyslog_d') -%>*.conf
#
# Emergencies are sent to everybody logged in.
#
+<% if scope.lookupvar('rsyslog::v8plus') == true -%>
+*.emerg :omusrmsg:*
+<% else -%>
*.emerg *
+<% end -%>