diff options
-rw-r--r-- | manifests/init.pp | 1 | ||||
-rw-r--r-- | manifests/params.pp | 15 | ||||
-rw-r--r-- | templates/rsyslog.conf.erb | 5 |
3 files changed, 18 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 7064c65..4b026b5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -33,6 +33,7 @@ class rsyslog ( $client_conf = $rsyslog::params::client_conf, $server_conf = $rsyslog::params::server_conf, $ssl = $rsyslog::params::ssl, + $modules = $rsyslog::params::modules, ) inherits rsyslog::params { class { 'rsyslog::install': } class { 'rsyslog::config': } diff --git a/manifests/params.pp b/manifests/params.pp index 5759433..f5d48cd 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -36,6 +36,11 @@ class rsyslog::params { $client_conf = "${rsyslog_d}client.conf" $server_conf = "${rsyslog_d}server.conf" $ssl = false + $modules = [ + '$ModLoad imuxsock # provides support for local system logging', + '$ModLoad imklog # provides kernel logging support (previously done by rklogd)', + '#$ModLoad immark # provides --MARK-- message capability', + ] } redhat: { if $::operatingsystemrelease >= 6.0 { @@ -64,6 +69,11 @@ class rsyslog::params { $client_conf = "${rsyslog_d}client.conf" $server_conf = "${rsyslog_d}server.conf" $ssl = false + $modules = [ + '$ModLoad imuxsock # provides support for local system logging', + '$ModLoad imklog # provides kernel logging support (previously done by rklogd)', + '#$ModLoad immark # provides --MARK-- message capability', + ] } freebsd: { $rsyslog_package_name = 'sysutils/rsyslog5' @@ -87,6 +97,11 @@ class rsyslog::params { $client_conf = "${rsyslog_d}client.conf" $server_conf = "${rsyslog_d}server.conf" $ssl = false + $modules = [ + '$ModLoad imuxsock # provides support for local system logging', + '$ModLoad imklog # provides kernel logging support (previously done by rklogd)', + '#$ModLoad immark # provides --MARK-- message capability', + ] } default: { case $::operatingsystem { diff --git a/templates/rsyslog.conf.erb b/templates/rsyslog.conf.erb index cf4e4ee..f076fc4 100644 --- a/templates/rsyslog.conf.erb +++ b/templates/rsyslog.conf.erb @@ -4,9 +4,8 @@ #### MODULES #### ################# -$ModLoad imuxsock # provides support for local system logging -$ModLoad imklog # provides kernel logging support (previously done by rklogd) -#$ModLoad immark # provides --MARK-- message capability +<% @modules.each do |module_row| %> +<%= module_row %><% end %> ########################### #### GLOBAL DIRECTIVES #### |