Skip to content

Fix for allow_bash_command_substitution#30

Open
jorhett wants to merge 1 commit intovoxpupuli:masterfrom
jorhett:fix_allow_bash_command_sub
Open

Fix for allow_bash_command_substitution#30
jorhett wants to merge 1 commit intovoxpupuli:masterfrom
jorhett:fix_allow_bash_command_sub

Conversation

@jorhett
Copy link

@jorhett jorhett commented Feb 16, 2020

Pull Request (PR) description

Allow allow_bash_command_substitution to be set.

This Pull Request (PR) fixes the following issues

config manifest sets the value to a string of 0 or 1, but the template expects a Boolean. Since we need to allow for undef value, best to keep it Boolean all the way through.

Error: Evaluation Error: Error while evaluating a Function Call, lambda: parameter 'allow_bash_command_substitution' expects a value of type Undef or Boolean, got String (file: /etc/puppetlabs/code/environments/nrpe_update/modules/nrpe/manifests/config.pp, line: 24, column: 16) on node localhost.localdomain

Fixes bug where string is being passed where Boolean is expected
@jorhett jorhett requested a review from alexjfisher February 16, 2020 00:00
@@ -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! :)

@vox-pupuli-tasks
Copy link

Dear @jorhett, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs?
If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com.
You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@vox-pupuli-tasks
Copy link

Dear @jorhett, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs?
If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com.
You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@vox-pupuli-tasks
Copy link

Dear @jorhett, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs?
If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com.
You can find my sourcecode at voxpupuli/vox-pupuli-tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants