Vlad,
Have you tried setting the variable inside your Puppet manifest before you
call it in the template? Something like:
$ips = hiera_hash('allowed_ips')
file {/tmp/test:
content => template(iptables/test.erb)
}
And then in the template:
*<% ips.each do |comment, ip| -%>
*
* code <%= ip %> code # <%= comment %>*
*<% end %>*
I've not seen too many people calling hiera inside a function - let's
eliminate this first and see what happens.
On Thu, Feb 9, 2012 at 8:47 PM, Vlad <[email protected]> wrote:
> Thanks Nan, I've tried them all (hiera, hiera_array and hiera_hash),
> unfortunately with no luck.
> Like I mentioned above, it doesn't have to be necessarily a hiera hash.
> Even a simple var: name inside the yaml file gives that error. As long as
> you have an array defined as a parameter, together with any type of
> variable from hiera (string, array, or hash), it doesn't work.
>
> --
> 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/-/U6a7O_EwdyYJ.
>
> 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.
>
--
Gary Larizza
Professional Services Engineer
Puppet Labs
--
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.