Here are the slides from Nick Lewis' PuppetConf 2016 presentation called Closing the Loop: Direct Change Control with Puppet. Watch the videos at https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
16. puppet job run --nodes foo.example.com,bar.example.com,baz.example.com
puppet job run --query 'inventory { facts.osfamily = "Debian" }'
puppet job run --query 'resources { type = "Service" and title = "httpd" }'
17. inventory { facts.osfamily = "Debian"
and resources { type = "Service" and title = "httpd" }
limit 3 }
nodes { last_report_status = "failed" }
catalogs { ! code_id = "urn:puppet:code-id:1:a393e1b;production" }