Hi,

I've just run into a small glitch with Hiera.

I have a YAML file that has a definition like this:
puppet_agent_splay: false
but the run fails because of
"err: Could not find data item puppet_agent_splay in any Hiera data
file and no default supplied at
/puppet/modules/puppet/manifests/agent/config.pp:6 on node
slave1.local"

Digging into this it turns out that lookup in hiera/backend.rb[1] has
this line while iterating over all backends: "break if answer" Which
doesn't work when any of the backends returns a false boolean because
it'll never break.

My ruby skills are very limited so I don't know how to fix it properly
but a workaround is to change parse_answer[2] to return a string
instead: return data.to_s
Another workaround is to quote (false) booleans in the YAML files.

Not sure if there are other implications.

Cheers,
Lars

[1] <https://github.com/puppetlabs/hiera/blob/master/lib/hiera/backend.rb#L162>
[2] <https://github.com/puppetlabs/hiera/blob/master/lib/hiera/backend.rb#L109>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to