Right now I have the following in my Vagrantfile:
config.vm.provision :chef_solo do |chef| chef.cookbooks_path = \"cookbooks\" chef.add_recipe \"apt\"
To run apt-get update at compile time, do:
e = execute "apt-get update" do action :nothing end e.run_action(:run)
check https://wiki.opscode.com/display/chef/Evaluate+and+Run+Resources+at+Compile+Time