Harish,

The reason for that is the resources returned by puppet resource come from
the RAL, rather than PuppetDB. If you were to declare puppet resources with
the content included in your paste, then they would show up in PuppetDB.

PuppetDB will only include version information on package resources if the
package is managed by puppet and the version is specified in the resource
declaration. The most straightforward way to get information on all
packages installed (e.g not managed by Puppet) into PuppetDB is to create a
custom fact. I saw a module posted to the forge to do this the other day:
https://forge.puppet.com/rmueller/pkg_inventory

Looks like it currently supports only redhat but if you're on something
else you should be able to get an idea of how to adapt it based on the fact
defined here:
https://github.com/roman-mueller/rmueller-pkg_inventory/blob/master/lib/facter/pkg_inventory.rb
.

Given the fact you could get the data by querying
localhost:8080/v4/facts/packages, assuming the name of the fact is
"packages".

Hope that helps.

Wyatt

-- 
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/CAJDiH3FrcyX9-BV9jSOocbi3V_4NAfBg9zNJsCTz5F%2BBSrD7rw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to