Goodmorning i'm trying to write a puppet-query to ...
# bolt
m
Goodmorning i'm trying to write a puppet-query to select all certnames of nodes with a certian security update in the fact os_patching.security_package_updates. I can do this with the help of jq. But i dont know how to perform this in PQL as inventory for Bolt. Any suggestions? This is the query:
puppet-query  -c ~/.puppetlabs/client-tools/puppetdb_test.conf "inventory[certname, facts.os_patching.security_package_updates] {facts.os_patching.security_package_updates is not null and facts.kernel = 'Linux'}" | jq -r '.[] | select(."facts.os_patching.security_package_updates" | index("expat.x86_64")) | .certname'