Malintha Adikari
2014-Jun-19 07:50 UTC
[Puppet Users] External facter json array iteration inside puppet template
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 -%>
Regards,
Malintha
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/c3909e1e-8bf7-4ddf-b522-2d747f19199b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.