The Inventory endpoint 
<https://www.puppet.com/docs/puppetdb/7/api/query/v4/inventory.html> 
supports querying based on dotted fact paths 
<https://www.puppet.com/docs/puppetdb/7/api/query/v4/ast.html#dotted-projections>
 
for both projected values and query filters.

A similar PQL query to what you describe would look like

inventory[certname, facts.os.release.major] {
  facts.os.release.major = "8"
}

On Wednesday, March 22, 2023 at 8:57:37 AM UTC-7 [email protected] wrote:

> I've historically done a lot of puppetdb queries based on legacy 
> system facts that are going away in puppet 8, e.g.:
>
> https://[server]:8081/pdb/query/v4/facts/lsbmajdistrelease/8
>
> Is there a puppetdb endpoint or trick that I can use to do the
> same thing in the new way, with say, os.release.major?
>
> This seems like it will be an important part of retiring legacy,
> non-nested facts.
>
> - Tim Skirvin ([email protected])
> -- 
> Fermilab SCF-SSI - HPC Architect He, Him, His

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b831594b-c99a-4408-b7da-ad4d34204855n%40googlegroups.com.

Reply via email to