Perhaps try using the str2bool function from puppetlabs-stdlib [1].

  - Keith

[1] https://github.com/puppetlabs/puppetlabs-stdlib
On 17 Apr 2013 18:09, "Matthias Saou" <matth...@saou.eu> 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:  matth...@saou.eu             ████  ██████  ████
>                                        ██████████████████████
> 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.
>
>
>

-- 
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