On Thursday, March 7, 2013 6:38:52 AM UTC-6, Ahmed Kamal wrote:
>
> I'm on 3.1, and I'm finding that "true" works as expected, but "false"
> does not! I think "false" is interpreted as "undef" or so, thus taking
> value from the module's default params
>
False is being treated as the lookup function itself returning false -
which then means nil is used and the next level of looking for a default
(either the next level of hierarchy, the next backend or the defaults
defined with the class.
I think this is supposed to be fixed in hiera 1.2, which just had rc1
released, but I am not positive.
>
> On Tuesday, March 5, 2013 10:08:44 PM UTC+2, Jakov Sosic wrote:
>>
>> Hi...
>>
>> I've been trying to set up boolean values in Hiera, but with no luck.
>>
>> For example, I'm using puppetlabs-haproxy module, and this is a code
>> snippet:
>>
>> class haproxy (
>> $manage_service = true,
>> ...
>> ) inherits haproxy::params {
>> ...
>>
>> if $manage_service {
>> }
>> }
>>
>> Now, this is how I set up values in hiera:
>>
>> haproxy::manage_service: false
>>
>>
>> But, it seems that $manage_service is always true... I tried by single
>> quoting 'false', capital letter False, but nothing helps...
>>
>> Only thing so far I've found out is to change the manifest code to look
>> like this:
>>
>> if $manage_service == 'true' {
>> }
>>
>>
>> Any ideas?
>>
>>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.