summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/params.pp5
-rw-r--r--templates/client.conf.erb6
-rw-r--r--templates/rsyslog.conf.erb4
4 files changed, 16 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index f0b2cd2..5758b13 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -37,7 +37,8 @@ class rsyslog (
$server_conf = $rsyslog::params::server_conf,
$ssl = $rsyslog::params::ssl,
$modules = $rsyslog::params::modules,
- $preserve_fqdn = $rsyslog::params::preserve_fqdn
+ $preserve_fqdn = $rsyslog::params::preserve_fqdn,
+ $v8plus = $rsyslog::params::v8plus
) inherits rsyslog::params {
class { 'rsyslog::install': }
class { 'rsyslog::config': }
diff --git a/manifests/params.pp b/manifests/params.pp
index f4cd74b..2628d46 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -45,6 +45,7 @@ class rsyslog::params {
$preserve_fqdn = false
$service_hasrestart = true
$service_hasstatus = true
+ $v8plus = false
}
redhat: {
if $::operatingsystem == 'Amazon' {
@@ -119,6 +120,7 @@ class rsyslog::params {
$preserve_fqdn = false
$service_hasrestart = true
$service_hasstatus = true
+ $v8plus = false
}
sles: {
$rsyslog_package_name = 'rsyslog'
@@ -140,6 +142,7 @@ class rsyslog::params {
$service_name = 'syslog'
$client_conf = "${rsyslog_d}client.conf"
$server_conf = "${rsyslog_d}server.conf"
+ $v8plus = false
}
freebsd: {
$rsyslog_package_name = 'sysutils/rsyslog5'
@@ -173,6 +176,7 @@ class rsyslog::params {
$preserve_fqdn = false
$service_hasrestart = true
$service_hasstatus = true
+ $v8plus = false
}
default: {
@@ -209,6 +213,7 @@ class rsyslog::params {
$preserve_fqdn = false
$service_hasrestart = true
$service_hasstatus = true
+ $v8plus = false
}
default: {
fail("The ${module_name} module is not supported on ${::osfamily}/${::operatingsystem}.")
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 -%>