iptables::test:
ip:
1.1.1.1 : 'adm-1'
2.2.2.2 : 'adm-2'
3.3.3.3 : 'adm-3'
$variable1 = hiera('iptables::test:')
$variable2 = inline_template("<% @variable1.each do |key,value| %>Allow From <%=key %> #<%=value %>\n<% end -%>")
iptables::test:
ip:
1.1.1.1: 'adm-1'
2.2.2.2: 'adm-2'
3.3.3.3: 'adm-3'
$variable1 = hiera('iptables::test.ip')
$variable2 = inline_template( "<% @variable1.each do |key,value| %>Allow From <%=key %> #<%=value %>\n<% end -%>")
notify { "result: ${variable2}": }
result:
Allow From 1.1.1.1 #adm-1
Allow From 2.2.2.2 #adm-2
Allow From 3.3.3.3 #adm-3