Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
Clean up apt packages at the end of Chef run
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Mar 15, 2012
1 parent fb9c440 commit 9f39ec6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ci_environment/apt/recipes/default.rb
Expand Up @@ -20,10 +20,16 @@
execute "apt-get update" do
action :run
end
execute "apt-get -y autoclean autoremove" do
action :nothing
end
template "/etc/apt/sources.list" do
source "sources.list.erb"

notifies :run, resources(:execute => "apt-get update"), :immediately

# cleans up at the end of Chef run
notifies :run, resources(:execute => "apt-get -y autoclean autoremove")
end

%w{/var/cache/local /var/cache/local/preseeding}.each do |dirname|
Expand Down

0 comments on commit 9f39ec6

Please sign in to comment.