Hi All,
In hiera, I have something like:
interfaces:
nic1:
10G: true
ip: x.x.x.x
netmask: x.x.x.x
nic2:
ip: x.x.x.x
netmask: x.x.x.x
This hiera config is used to build the interface configuration files. Now,
if a server has at least ONE NIC with 10G == true, I want to make a few
more changes to that machine. It can happen from various manifests so
preferably I'd like a global boolean or some way to say "if $10G { ... }".
I could have a root setting called "10G: true" and I can just do:
if hiera('10G', false) {
// do stuff
}
... but I'd like to avoid having to duplicate the 10G setting in the hiera
file.
The logic I had in mind was to go through hiera('interfaces') and, if any
NIC has 10G == true, then set a global "boolean" that I can reference from
any manifest.
I thought I could write a custom fact of some sort that calls hiera(), but
since the fact gets generated on the client and hiera is on the server...
Any ideas?
Thanks in advance.
Gonzalo
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.