Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding of the Include directive in the /etc/rsyslog.conf file to support older versions of rsyslogd. #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading