I'm going through our puppet configuration trying to get ready for an 
eventual upgrade to puppet 4.

One thing I'm curious about, though, is the use of str2bool.

In the introduction to the future parser in the 3.8 documentation 
(http://docs.puppetlabs.com/puppet/3.8/reference/experiments_future.html#facts-can-have-additional-data-types),
 
the suggestion for having code that works in both puppet 3 and 4 is to:
* Interpolate the fact into a string ("$is_virtual")…
* …then pass the string to the stdlib str2bool function 
(str2bool("$is_virtual")).

However, I'm not sure why interpolating into a string is necessary? If you 
pass a bool into str2bool, you get that bool right back out, and my tests 
(with puppet 3.8 and with and without --parser=future) show that 
interpolating into a string first isn't necessary.

Is there a subtlety I'm missing?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1de2bcbe-a2ee-4f3a-ae6d-79720f62dc96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to