<% if @ospf and @
ospf != "" -%> <% @
ospf.sort.map do |iname,instance| -%>
protocol ospf <% iname =%>: (...) But I think you can probably use create_resource() Best regards,
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ee60bb31-1cc7-4b92-8030-f9a6bc14fd20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi!, I'm starting to work with hiera and file templates, how would be the best way to transform this hiera output:myanycast::bird::ospf:myinstance:tick: 2rfc1583compat: 'yes'export: 'all'area:990:stub: 'no'interface:eth0:hello: 10retransmit: 6cost: 10transmit_delay: 5dead_count: 5dead: 40wait: 50type: 'broadcast'To this in the final configuration file using templates?:
protocol ospf myinstance:tick 2;
yes;export all;area 990 {stub no;interface "eth0" {hello 10;retransmit 6;cost 10;transmit delay 5;dead count 5;dead 40;wait 50;type broadcast;};};}
There can be many areas per instance, and many interfaces per area.
Also, something that I noticed about hashes is that each hiera query (at least by hand) gives me the same data in different order. Can this trigger a different md5 for the file and force a service reload each 30 minutes even there are no configuration changes?
> <mailto:puppet-users+unsub...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/3fc2f5c1-532a-4de0-b461-10708dd5d9df%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/3fc2f5c1-532a-4de0-b461-10708dd5d9df%40googlegroups..com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
Trying this approach I get "Detail: undefined method `each_pair' for #<Array:0x7f19bc81d288>" using this code:<% if (@ospfconfig.is_a?(Hash)) and (@ospfconfig.count > 0) -%><% @ospfconfig.sort.each do |instance,instparam| -%>protocol ospf <%= instance %> {}<% end -%><% end -%>
Can it be a Ruby version thing?