Skip to content

Commit

Permalink
Merge pull request #395 from bastelfreak/pql23
Browse files Browse the repository at this point in the history
Add more PQL query examples
  • Loading branch information
bastelfreak authored Nov 19, 2024
2 parents d6c40e8 + 49c161b commit e110e4e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions _docs/pql_queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,27 @@ Result:

```

### Get value for fact A that have a specific value on fact b

This returns the ip address for all nodes where the trusted fact `pp_role` is `foobar`

```shell
puppet query 'inventory[certname,facts.networking.ip]{ trusted.extensions.pp_role = "foobar"}'
```

```json
[
{
"certname": "bastel.local",
"facts.networking.ip": "127.0.0.1"
},
{
"certname": "freak.local",
"facts.networking.ip": "127.0.0.2"
}
]
```

### Get all values for a structured fact

The facts endpoint doesn't support structured facts :(
Expand Down

0 comments on commit e110e4e

Please sign in to comment.