I am sending data from puppet agent to master node. Here I use json array in my facters/facts.d/myData.json file. In master side I have a template. There I want to iterate this external fact json array.
{ "employees" :
[
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"},
{"firstName":"Peter", "lastName": "Jones"},
]
}
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