add new filter example

This commit is contained in:
ebner committed 2026-03-19 14:41:02 +01:00
1 parent 054e3959e9
commit 7fa32ee305
1 file changed
+7
+7
View File
@@ -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