I'd like to be able to collect all the hostnames (fqdn) or ips of certain
hosts to be used in setting up firewall rules. I'd like to search for
hosts that have included a particular class, perhaps by simply setting a
tag when that resource is included.
eg:
node 'node1' {
include 'somewebclass'
}
class somewebclass {
tag 'web'
# other stuff
}
Then in another class, I'd like to find all my 'web' hosts and allow them
access in a firewall rule.
eg:
class somedbclass {
tag 'db'
iptables { "allow db access":
proto => 'tcp',
dport => '3306'
source => Node <| tag == 'web' |>,
jump => 'ACCEPT'
}
}
So, ultimately, I'd need that Node <| tag == 'web' |> to be an array of
hostnames or ipaddresses.
This is just an example to try to explain what I am doing. Does anyone
know how to do this? Can I do this in puppet? Do I need to write my own
function to handle this? Or, can I use something like hiera or puppetdb to
do this?
Thanks for any tips.
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.