Is it possible to tell puppet to compile a catalog for one (or all) node(s) and save that particular data somewhere?
I'm specifically interested in getting all needed packages and their versions per node, but a general approach for getting any data is also suitable.
UPDATE
This original answer is now out of date. The updated command for Puppet 3.x is:
If you're looking for all the packages and versions installed on a node regardless of whether they're installed by Puppet or not, the following command is built in and can be run on any Puppet node:
ralsh package
This will output the data in a Puppet manifest form to stdout.
Ralsh will work for any resource type that has the
instances
method implemented (users, groups, etc.).If you're looking to centrally inspect the YAML catalog for all resources defined in Puppet manifests, your Puppetmaster already caches this information in
/var/lib/puppet/client_yaml/catalog
and you just need to parse it with your YAML parser of choice. The Puppet Inventory Service that was introduced fairly recently may also be a good option for you; you can make do with storeconfigs if you're running on an older version like 0.25.x.Honestly, this is the sort of thing that mcollective was built to do. Specifically, the package provider for mcollective: http://projects.puppetlabs.com/projects/mcollective-plugins/wiki/AgentPackage
This completely skips puppet, and doesn't even require that puppet is installed.