Skip to content

Instantly share code, notes, and snippets.

@mdkent
Forked from anonymous/gist:285986
Created January 25, 2010 18:06
Show Gist options
  • Save mdkent/286076 to your computer and use it in GitHub Desktop.
Save mdkent/286076 to your computer and use it in GitHub Desktop.
collection.each do |r|
if r.class == Chef::Resource::Package
if r.action.to_s.include?("install") or r.action.to_s.include?("upgrade")
r.action :upgrade
elsif r.action.include?(:remove) or r.action.include?(:purge)
r.action :purge
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment