Looks like a default of [] triggers https://github.com/puppetlabs/hiera-puppet/blob/master/lib/puppet/parser/functions/hiera_array.rb#L32 to think that the `.lookup` function did not get an answer.
Hiera and Hiera-puppet have to distinguish between empty/false/nil answers sent by the backend due to missing data, or empty/false/nil answers explicitly returned as the default value or found value. Having hiera just return an empty answer when an answer is not found would probably not be preferable, so nil could possibly be the "not found" value? -Hunter On Monday, April 2, 2012 5:03:37 AM UTC-7, pablo.f...@cscs.ch wrote: > > Hi, > > There is probably something stupid I am missing, but I just can't see > it. I do: > > $iptables_open_ports_public = hiera_array ('iptables_open_ports_public', > []) > > And I have not defined that in the hiera tree, so the default (an empty > array) should be returned. But I get, instead: > > "Error 400 on SERVER: Could not find data item > iptables_open_ports_public in any Hiera data file and no default supplied" > > Is there any special way to define an empty array as a parameter? > > Thanks! > Pablo > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/qiLhtq9pEX8J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.