Hey Matthias! It's a Puppet bug. Sorry. 
http://projects.puppetlabs.com/issues/17474

It's fixed in 3.2, which isn't quite out yet -- 3.2.0-rc1 is probably 
coming out this week. 

In the meantime, Keith is right: 

- Put quotes around "false" in your Hiera yaml files. 
- In your Puppet code, put a line like:

$service_real = str2bool("$service")

I've been calling that pattern "sloppy bools." It will work around the bug 
for now, and continue to work once the bug is fixed and you start using 
real booleans in your yaml again.

On Wednesday, April 17, 2013 10:09:30 AM UTC-7, Matthias Saou wrote:
>
> Hi, 
>
> I'm trying to clean up some manifests by moving class parameters which 
> I change globally to Hiera lookups. 
>
> I've been fighting with a boolean parameter for the last hour. My class 
> has a parameter called $service, to enable/disable its service (duh!). 
>
> When I try to set "mymodule::service: false" from Hiera, it's ignored 
> for some reason, and the $service variable inside mymodule is always 
> "true", because that's the default. 
>
> If I pass a string, it gets across just fine. I just can't get the one 
> useful value, which is the boolean opposite of the default... 
>
> Other variable names don't seem to have this problem. It seems that 
> I've been bitten once more by "mostly-working-but-reserved-somewhere" 
> variable names. 
>
> Does anyone know Hiera internals enough to confirm this? 
>
> Do I have any options other than renaming the parameter? 
>
> Matthias 
>
> -- 
>             Matthias Saou                  ██          ██ 
>                                              ██      ██ 
> Web: http://matthias.saou.eu/              ██████████████ 
> Mail/XMPP:  matt...@saou.eu <javascript:>             ████  ██████  ████ 
>                                        ██████████████████████ 
> GPG: 4096R/E755CC63                    ██  ██████████████  ██ 
>      8D91 7E2E F048 9C9C 46AF          ██  ██          ██  ██ 
>      21A9 7A51 7B82 E755 CC63                ████  ████ 
>

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to