summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorYasser Nabi <yassersaleemi@gmail.com>2014-07-10 19:33:33 +0100
committerYasser Nabi <yassersaleemi@gmail.com>2014-07-10 19:33:33 +0100
commit9fcacf58190007e27b01e623f91a63ad481bc43e (patch)
treea4869af038c9bce7e0065e27b85967a6c8e22479 /templates
parent3b49f0c389e04971e1a3623e731e588b7fadb2d1 (diff)
Use fact for rsyslog version instead of param
With the introduction of the rsyslog_version fact, it seems more consistent to use that to determine what version of the config to use. The fact has also been updated to support FreeBSD (although not well tested)
Diffstat (limited to 'templates')
-rw-r--r--templates/client.conf.erb2
-rw-r--r--templates/rsyslog.conf.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/client.conf.erb b/templates/client.conf.erb
index 9dc5083..d72e080 100644
--- a/templates/client.conf.erb
+++ b/templates/client.conf.erb
@@ -165,7 +165,7 @@ mail.* -/var/log/maillog
cron.* /var/log/cron
# Everybody gets emergency messages
-<% if scope.lookupvar('rsyslog::v8plus') == true -%>
+<% if @rsyslog_version.split('.')[0].to_i >= 8 -%>
*.emerg :omusrmsg:*
<% else -%>
*.emerg *
diff --git a/templates/rsyslog.conf.erb b/templates/rsyslog.conf.erb
index 0339ef9..446c91e 100644
--- a/templates/rsyslog.conf.erb
+++ b/templates/rsyslog.conf.erb
@@ -35,7 +35,7 @@ $IncludeConfig <%= scope.lookupvar('rsyslog::rsyslog_d') -%>*.conf
#
# Emergencies are sent to everybody logged in.
#
-<% if scope.lookupvar('rsyslog::v8plus') == true -%>
+<% if @rsyslog_version.split('.')[0].to_i >= 8 -%>
*.emerg :omusrmsg:*
<% else -%>
*.emerg *