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 8f9b639..d484492 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: { $rsyslog_package_name = 'rsyslog' @@ -63,6 +68,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' @@ -86,6 +96,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 #### |