Does anyone else have any concern about populating custom facts that list ALL packages installed on a system? My sense is that it has the potential to create a lot of overhead for facter, and in turn puppet itself. (A typical linux system will have hundreds of packages installed). I also don't think putting the data in facter as key value pairs necessarily presents the data in a useful form, but that may be in the eye of the beholder.
-Brian On Sep 21, 3:14 pm, Ashay <[email protected]> wrote: > On Sep 21, 10:53 am, Glenn Bailey <[email protected]> wrote: > > > >> Before I go about writing one myself, anyone out there written a > > >> software inventory module/fact for gathering a list of all installed > > >> rpms/debs on a system? Got a few ideas floating around in my head, but > > >> wanted to see if/what other folks have done .. > > > > you can already do this with: > > > > puppet resource package > > > > this will generate a manifests that represents all of the packages > > > installed > > > on a system. > > > Let me re-phrase a bit, I'm trying to get a fact setup to collect this > > information and I can report of my Puppet DB. Was just thinking of > > doing an auto-increment so it would be something like "package0 => > > package_name-version" "package1 => package_name-version" etc. Parsing > > "puppet resource package" will make it easier for writing a single > > module for rpm/deb .. > > You could distribute a custom fact like this > one:https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d > > Then you can use a cron job that runs "rpm -qa" and populates /etc/ > facts.d/pkgs.txt like so: > > pkg0=httpd-2.2.15-5.el6.centos.x86_64 > pkg1=nscd-2.12-1.7.el6.x86_64 > . > . > > or even > > pkgs=httpd-2.2.15-5.el6.centos.x86_64:nscd-2.12-1.7.el6.x86_64:other_pkgs_colon_seperated > > Either way, it doesn't look elegant if a large number of packages is > installed. > > If you care about certain packages only, you can populate the file > with those package names. > > Or you can populate it with the output of "yum check-update" or "apt- > get upgrade -V" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
