There's a couple of issues with that, see
http://stackoverflow.com/questions/24301360/puppet-external-facter-json-array-iteration-inside-puppet-template

Does this facilitate cross posting already? ;/

On 06/19/2014 09:50 AM, Malintha Adikari wrote:
> 
>       
> 
> I am sending data from puppet agent to master node using external facts.
> Here I use json array in my facters/facts.d/myData.json file.
> 
> |"employees":[
> {"firstName":"John", "lastName":"Doe"},
> {"firstName":"Anna", "lastName":"Smith"},
> {"firstName":"Peter", "lastName":"Jones"}
> ]
> 
> ||In master side I have a template. There I want to iterate this external 
> fact json array.  |Can I do this thing inside puppet template ? How Can I 
> iterate this array ? I tried following but failed
> 
> |<% @employees.each do |firstname| -%>
> malintha
> <% end -%>|
> 

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53A2BB95.1020008%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to