Hi,

Something like this :

|<%if  @ospf and @||ospf!=""  -%>
    <%@||ospf.sort.mapdo  |iname,instance| -%>|
|   |protocol ospf <% iname =%>:
    (...)

But I think you can probably use create_resource()

Best regards,


Le 06/10/2014 00:55, Ciro Iriarte a écrit :
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: 2
    rfc1583compat: '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'

To this in the final configuration file using templates?:

protocol ospf myinstance:
  tick 2;
  rfc1583compat 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?

Regards,
Ciro

--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ee60bb31-1cc7-4b92-8030-f9a6bc14fd20%40googlegroups.com <https://groups.google.com/d/msgid/puppet-users/ee60bb31-1cc7-4b92-8030-f9a6bc14fd20%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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/54322DC3.1080102%40quake.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to