[chef] Re: Re: Listing chef-installed software packages


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Re: Listing chef-installed software packages
  • Date: Mon, 04 Jul 2011 22:55:13 +0530

On 07/04/2011 10:40 PM, Lee Maguire wrote:
Is there any way, from within a recipe, to obtain an array of all the
system packages (e.g. via apt on debian) or ruby gems explicitly
installed on the node as a result of the node's current run list?
I don't know if there's any clean way to do that, as the ruby gems or
deb package dependency is managed via apt or gem (the package manager
itself)
I'm not interested in the dependencies, just those that have been
explicitly installed by recipes (i.e. as the package resource).

aha.. then its easy, you can use any report handlers, the report method invoked with a run_status object which contain updated_resources object, which is actually a resource collection; you can use this collection and filter out only the packages that are updated or installed.
regards
ranjib

http://wiki.opscode.com/display/chef/Exception+and+Report+Handlers



Archive powered by MHonArc 2.6.16.

§