This network lookup is simple and works well...but only on some clients
because they have more than one network interface:
hiera.yaml:
---
:hierarchy:
- "%{::trusted.certname}"
- "%{::network}"
- common
It fails on some machines because they have docker virtual interfaces and
instead return a network name like 172.0.0.0 instead of the one I want:
10.1.1.0.
It seems the lookup just picks the first interface listed in the
::networking array.
Are there any other methods to do lookups based on the network? I want to
match the same network that puppet is working on.
My experience is I can't easily parse the hiera lookup for ::networking
(asked here
<https://groups.google.com/forum/#!searchin/puppet-users/hiera$20by$20network|sort:relevance/puppet-users/JXVV79GbuvA/z2lNPubRR-wJ>)
but maybe I can with hiera5 with globs
<https://docs.puppet.com/puppet/4.9/hiera_config_yaml_5.html>.
Thx,
-peter
--
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/0593fc69-c51e-4176-a4c8-c28840ac59a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.