diff --git a/docs/engineering-guide/puppet/api.md b/docs/engineering-guide/puppet/api.md index cd11d948..3b156ba4 100644 --- a/docs/engineering-guide/puppet/api.md +++ b/docs/engineering-guide/puppet/api.md @@ -20,6 +20,13 @@ With jq you can filter the output to get only the information you are interested curl -G https://puppet.psi.ch/pdb_api/inventory | jq '.[].certname' ``` +List all machines with a specific package such as `yfs-client` installed: + +```bash +curl -G https://puppet.psi.ch/pdb_api/inventory | jq -r '.[] | select(.facts.installed_packages[][0] | startswith("yfs-client")) | .certname ' +``` + + More details about what is possible with the API can be found here: https://help.puppet.com/pdb/8/topics/query.htm