forked from linux/documentation
add new filter example
This commit is contained in:
1 parent
054e3959e9
commit
7fa32ee305
1 file changed
+7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user