- From: Lee Maguire <
- Subject: [chef] Re: Listing chef-installed software packages
- Date: Tue, 05 Jul 2011 16:31:39 +0100
> 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.
So the only way to access this information is adding report handlers to
client.rb - it can't be done from within cookbooks?
I'm trying to automatically populate the deborphan "keep" file with
packages that have been installed by chef.
class Keep < ::Chef::Handler
@config = config
@config[:keepfile] ||= "/var/lib/deborphan/keep"
File.open(config[:keepfile],'w') do |keep|
run_status.all_resources.each do |r|
if (r.resource_name.to_s == 'package') && (r.action.to_s ==
'install' ) then
Archive powered by MHonArc 2.6.16.