we end up doing this a lot: $var = hiera_hash('key','SOMESTRING') if is_hash($var) { .... }
not the most elegant On Friday, April 6, 2012 11:52:58 AM UTC-5, psychobyte wrote: > > I don't think hiera likes defaults as array/hashes explicitly > > I usually do a > > $empty_hsh = {} > $empty_arr = [] > > and use those as default values. > > HTH > > > 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/-/Ikyx3E7QWogJ. 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.