On Thu, Mar 07, 2013 at 12:43:26PM -0800, Nick Fagerlund wrote:
>
> Yeah it's definitely a bug, but I think it's
>
http://projects.puppetlabs.com/issues/17105 -- not sure when it'll be
> fixed, but I know they're working on it and consider it serious.
>
> If you need it to work today, you can use the "sloppy bools" pattern, and
> use a string (instead of a real bool) in your hiera data:
>
> class myclass ($myparam) {
> $myparam_real = str2bool("$myparam")
> #... use $myparam_real everywhere below here.
> }
>
> ---
> myclass::myparam: "false"
>
> This will make it so $myparam can be a string, a real boolean, or a number
> (0/1), and still work fine. Note the quotes in the str2bool call; those
> make it so you can later change the hiera data to a real bool (after the
> bug is fixed) without changing your code.
true/false must be unquoted. Otherwise 'true' = a string containing the