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

Fix for allow_bash_command_substitution #30

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
7 changes: 1 addition & 6 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
ensure => present,
}

$_allow_bash_command_substitution = $nrpe::allow_bash_command_substitution ? {
undef => undef,
default => bool2str($nrpe::allow_bash_command_substitution, '1', '0'),
}

concat::fragment { 'nrpe main config':
target => $nrpe::config,
content => epp(
Expand All @@ -32,7 +27,7 @@
'nrpe_group' => $nrpe::nrpe_group,
'allowed_hosts' => $nrpe::allowed_hosts,
'dont_blame_nrpe' => bool2str($nrpe::dont_blame_nrpe, '1', '0'),
'allow_bash_command_substitution' => $_allow_bash_command_substitution,
'allow_bash_command_substitution' => $nrpe::allow_bash_command_substitution,
'libdir' => $nrpe::params::libdir,
'command_prefix' => $nrpe::command_prefix,
'debug' => bool2str($nrpe::debug, '1', '0'),
Expand Down
2 changes: 1 addition & 1 deletion templates/nrpe.cfg.epp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ dont_blame_nrpe=<%= $dont_blame_nrpe %>

#allow_bash_command_substitution=0
<% if $allow_bash_command_substitution { -%>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the original intention was to default to whatever nrpe's default is (possibly version dependent?) by not writing anything but allowing either true/false to explicitly set the option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's important to some people to be able to explicitly set allow_bash_command_substitution=0 (even if that has always been the default??). Either way, I've opened #32 with just a fix to the template and the tests I should have added when I broke everything 16 months ago! :)

allow_bash_command_substitution=<%= $allow_bash_command_substitution %>
allow_bash_command_substitution=1
<%- } -%>


Expand Down