The puppet compiler currently allows you to specify a regex in the nodes filed using the format R:${regex}. it would be useful if we could also specify hosts using the cumin query language. At the very least it would be useful to run on all hosts with a specific role/class/resource which could be done by querying the local puppetdb api directly but i wonder if we could leverage the query syntax already available in puppet.
@Volans is cumin worth exploring or should we just query puppetdb?