I've moved from a Chef shop to a Puppet shop.
Here's something I would commonly do in Chef: I would have a template for a config file for, say, Varnish or haproxy, that would route requests to nodes matching a particular role and environment.
The best correlation for the Chef "role" I can find is a Puppet "group."
What's the equivalent of the Chef search? How do I get a collection of nodes (which I guess means their facts) that match some criteria?
Edit: I appreciate the great links and pointers! I'll add that our shop uses theForeman to manage hosts, environments, and puppet classes assigned to nodes. Does it come to play in PuppetDB queries?