Skip to content

Commit

Permalink
Allow overriding of the Include directive in the /etc/rsyslog.conf fi…
Browse files Browse the repository at this point in the history
…le to support older versions of rsyslogd.
  • Loading branch information
bschonec committed Dec 4, 2024
1 parent 40440a8 commit 9df5ad5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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!')
Expand Down

0 comments on commit 9df5ad5

Please sign in to comment.