You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I accidentally stumbled on your Puppet files and started looking into them. There's a few places where you do the following:
if$var != true and $var != 'true' {
..
}
You can avoid that by calling out to the str2bool() function from puppetlabs-stdlib which is already a dependency according to your Modulefile. str2bool() will return the boolean if a boolean is passed in.
This in turn now allows you to simply do:
if str2bool($var) != true {
...
}
This will cover both the boolean true and the string 'true'.
The text was updated successfully, but these errors were encountered:
Yeah, thanks for pointing that out. That was thrown in (in a poor way) to take into account hiera's dislike of false. I started rewriting the module earlier today to fix #123's issues (and some I've ignored) and have thrown this in as well already as the two conditionals are just a nasty hack.
I accidentally stumbled on your Puppet files and started looking into them. There's a few places where you do the following:
You can avoid that by calling out to the
str2bool()
function from puppetlabs-stdlib which is already a dependency according to your Modulefile.str2bool()
will return the boolean if a boolean is passed in.This in turn now allows you to simply do:
This will cover both the boolean
true
and the string'true'
.The text was updated successfully, but these errors were encountered: