Skip to content

Commit 9df5ad5

Browse files
committed
Allow overriding of the Include directive in the /etc/rsyslog.conf file to support older versions of rsyslogd.
1 parent 40440a8 commit 9df5ad5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

manifests/base.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
file { $rsyslog::config_file:
6060
ensure => file,
61-
content => "${message}\ninclude(file=\"${rsyslog::confdir}/*.conf\" mode=\"optional\")\n",
61+
content => "${message}\n${rsyslog::config_file_include}\n",
6262
mode => $rsyslog::global_conf_perms,
6363
}
6464

manifests/init.pp

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
# Set the file mode for the rsyslog.d configuration directory.
8686
# @param global_conf_perms
8787
# Set the file mode for the /etc/rsyslog.conf
88+
# @param config_file_include
89+
# Override the include directive in the /etc/rsyslog.conf file.
8890
#
8991
class rsyslog (
9092
String $confdir,
@@ -118,6 +120,7 @@
118120
Stdlib::Filemode $conf_permissions = '0644',
119121
Stdlib::Filemode $confdir_permissions = '0755',
120122
Stdlib::Filemode $global_conf_perms = $conf_permissions,
123+
String $config_file_include = "include(file=\"${rsyslog::confdir}/*.conf\" mode=\"optional\")",
121124
) {
122125
if $manage_service == true and $external_service == true {
123126
fail('manage_service and external_service cannot be set at the same time!')

0 commit comments

Comments
 (0)