craigwatson / puppet-vmwaretools

Puppet module for non-OSP VMware Tools Installation
http://forge.puppetlabs.com/CraigWatson1987/vmwaretools
Apache License 2.0
27 stars 40 forks source link

Bug in init.pp causes code to never run #51

Closed ITestInProd closed 9 years ago

ITestInProd commented 9 years ago

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.

craigwatson commented 9 years ago

Thanks Justin, this has been fixed in f228630 :)