Hi,

First, hiera_array function if for creating an array looking for the key in
every hiera hierarchy, if the values are just on one level, you should use
the hiera function.

Second, the problem here is the way erb templates print arrays, so just a
matter of format.

Regards,
El 16/04/2014 18:31, "Sans" <r.santanu....@gmail.com> escribió:

> Hi there,
>
> Trying to figure out how to use  hiera-array in my template. So, this is
> what I have in .yaml file:
>
>
> my_coll_list:
>>     - mon502.local
>>     - mon522.local
>>
>
> and in my nodes.pp, I have this:
>
> $my_colloctors = hiera_array('my_coll_list')
>
>
>
> then in one of my ERB templates, I using that like this:
>
> COLLECTORS = <%= @my_colloctors %>
>>
>
>
> if i understood correctly, according the Puppet documentation, using *array
> merge lookup,* I was expecting a result like this: COLLECTORS =
> ['mon502.local', 'mon522.local']
> but what I'm getting is: COLLECTORS = mon502.localmon522.local
>
>
> What am I missing here?
>
> Best,
> San
>
> --
> 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 puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/ba8d7376-6c45-48d6-80a1-5e5d58af71cd%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/ba8d7376-6c45-48d6-80a1-5e5d58af71cd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAF_B3ddsiA-%2Be7b98PV0OUc79GavgtpWnMJx-K%3DSWbAwkTMpzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to