diff --git a/REFERENCE.md b/REFERENCE.md index 04ed01e..3b759f9 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -157,6 +157,7 @@ The following parameters are available in the `rsyslog` class: * [`conf_permissions`](#-rsyslog--conf_permissions) * [`confdir_permissions`](#-rsyslog--confdir_permissions) * [`global_conf_perms`](#-rsyslog--global_conf_perms) +* [`config_file_include`](#-rsyslog--config_file_include) * [`parser_priority`](#-rsyslog--parser_priority) ##### `confdir` @@ -350,6 +351,14 @@ Set the file mode for the /etc/rsyslog.conf Default value: `$conf_permissions` +##### `config_file_include` + +Data type: `String` + +Override the include directive in the /etc/rsyslog.conf file. + +Default value: `"include(file=\"${rsyslog::confdir}/*.conf\" mode=\"optional\")"` + ##### `parser_priority` Data type: `Integer` diff --git a/manifests/base.pp b/manifests/base.pp index 217fb26..d95f925 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -58,7 +58,7 @@ file { $rsyslog::config_file: ensure => file, - content => "${message}\ninclude(file=\"${rsyslog::confdir}/*.conf\" mode=\"optional\")\n", + content => "${message}\n${rsyslog::config_file_include}\n", mode => $rsyslog::global_conf_perms, } diff --git a/manifests/init.pp b/manifests/init.pp index cef1ccc..867a497 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -85,6 +85,8 @@ # Set the file mode for the rsyslog.d configuration directory. # @param global_conf_perms # Set the file mode for the /etc/rsyslog.conf +# @param config_file_include +# Override the include directive in the /etc/rsyslog.conf file. # class rsyslog ( String $confdir, @@ -118,6 +120,7 @@ Stdlib::Filemode $conf_permissions = '0644', Stdlib::Filemode $confdir_permissions = '0755', Stdlib::Filemode $global_conf_perms = $conf_permissions, + String $config_file_include = "include(file=\"${rsyslog::confdir}/*.conf\" mode=\"optional\")", ) { if $manage_service == true and $external_service == true { fail('manage_service and external_service cannot be set at the same time!')