> I can run 'puppet resource package' on a node to get a list of installed
> packages and version numbers.
>
> are those version numbers available through a PuppetDB(2.3) API query?

We don't currently store the version of pre-existing/unmanaged
resources. If you define a version explicitly, that gets compiled and
stored, but otherwise no.

This is something we are considering for future work however.

> the  http://localhost:8080/v3/catalogs/${NODE}
> call shows the desired end-state
>
>     "type" : "Package",
>     "title" : "libc6",
>     "parameters" : {
>        "ensure" : "latest"
>     },
>
> and
> curl -G 'http://localhost:8080/v3/events' --data-urlencode 'query=["and",
> ["=", "resource-type","Package"], ["=","resource-title","libc6"]]'
>
> will show what's changed or failed with libc6 .
>
> can I get the current package version number through an API call?

An alternative is to have this data be collected in a fact. If you
want all the package data, a well structured fact is suitable for
this. That will then get submitted each run, and can be queried via
the various facts endpoints.

ken.

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAE4bNTkzsBKhWdfr95w_PCJ%3Dre3%3DJFggy6RwwJ1u4_a0q7RxOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to