[chef] Re: chefonic way to do apt-get update


Chronological Thread 
  • From: Sean Escriva < >
  • To:
  • Subject: [chef] Re: chefonic way to do apt-get update
  • Date: Sat, 30 Jun 2012 16:44:11 -0700

Nothing wrong with an execute, but the apt cookbook will do this for you as mentioned.

Then within any other resource def you can use notifies like:


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

Notice that it's calling 'apt-get update' (no dash) and not 'apt-get-update' (with dash), which is also defined in by the apt cookbook.

-sme

On Sat, Jun 30, 2012 at 6:21 AM, David Montgomery < " target="_blank"> > wrote:
Hi,

what is the chef way for running apt-get update in a recipe?

for now I am using:

execute "apt_update" do
 command "apt-get update"
 action :run
end




Archive powered by MHonArc 2.6.16.

§