If you've got PuppetDB set up already then this is fairly simple. We use the puppetdbquery module (https://github.com/dalen/puppet-puppetdbquery) to do something like
$collectors = query_nodes('Package[A]', 'fqdn') Which would return an array of the FQDNs of all nodes that declared package a - the second argument can be any fact name. The query string can also be as complex as you like, matching resources with certain attributes or fact values. We use it to manage ElasticSearch clusters of which we have multiple, so we use a tag containing the cluster name to narrow down queries. -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b54a75e3-47b6-41d7-b067-14b95e2ffe76%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.