I THINK the new mapped_paths feature in Puppet 4.10 can do this, when
combined with the networking fact. Um, I think it'd look something like
this:
hierarchy:
- name: "Network interface (tries all interfaces)"
mapped_paths: [facts.networking.interfaces, interface,
"networks/%{interface.1.network}.yaml"]
Since facts.networking.interfaces is a hash, the local value of "interface"
is an array with one key/val par, so something like ["en0", { hash of
stuff, where we want the key 'network' }], hence interface.1.network.
--
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/c5ec439f-5a32-42cb-b7d0-16b116286b19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.