Right now I have the following in my Vagrantfile:
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = \"cookbooks\"
chef.add_recipe \"apt\"
It looks like the latest version of the opscode apt cookbook allow you to run it at compile time.
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "apt"
chef.json = { "apt" => {"compiletime" => true} }
end
As long as apt is run before other compiletime cookbooks (like postgres) in the run list, this should work.