Hello,

We've been using Hiera for a while and one of the things I'd like to do is 
use the data we have in the YAML backend and generate our BIND zonefiles 
and DHCPD.conf from it.

Every node has a stanza defined with it's 'primary' IP-address and 
MAC-address like so:
hostname.yaml:
---
m_interface:
  - ip: 127.0.0.1
  - mac_address: aa:bb:cc:dd:ee:ff

Based on that information and the YAML file it was found in (so the node in 
our case) I'd like to generate a dhcpd.conf like this:

host hostname(.yaml) {
  fixed-address: m_interface[ip]
  hardware ethernet: m_interface[mac_address]

Now, this can be done for a single node, however, I need a way to get that 
information for every node. As far as I understand both hiera_hash and 
hiera_array only walk the hierarchy upwards, not outwards (which is usually 
what you want anyway).

I'm looking for something like a hiera_all that would return a hash with 
the node name as key and value the m_interface stanza for that node.

At this point I'm not even sure this can be done so, anyone got any bright 
ideas?


Kind regards,

-- 
Daniele Sluijters

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/UujM_sYrG7QJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to