Bug in init.pp causes code to never run
ITestInProd opened this issue · comments
In the move to 1.0.0, commit fbb25f4 moves $is_virtual from a string to a bool.
Line 118
- if $::is_virtual == 'true' and $::virtual == 'vmware' and $::kernel == 'Linux' {
+ if $::is_virtual == true and $::virtual == 'vmware' and $::kernel == 'Linux' {
Line 146
- } elsif $fail_on_non_vmware == true and ($::is_virtual == 'false' or $::virtual != 'vmware') {
+ } elsif $fail_on_non_vmware == true and ($::is_virtual == false or $::virtual != 'vmware') {
Puppet docs treat variables as strings, not bool, natively (from https://docs.puppetlabs.com/learning/variables.html#aside-beware-of-the-fake-false).
It probably either needs to go back to using a string 'true' or enclose it in str2bool(). As is now, the code inside the if statement never runs.
Thanks Justin, this has been fixed in f228630 :)