Right now I have the following in my Vagrantfile:
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = \"cookbooks\"
chef.add_recipe \"apt\"
Without patching, this is a generic approach to the problem that will update on every run:
bash "update-apt-repository" do
user "root"
code <<-EOH
apt-get update
EOH
end
It may be worth considering that such a run, on every run, ties up a fair bit of system resources for about 30 seconds; you may want to have a special recipe named recipe::update_apt that you have run via cron or via some other event i.e.
chef-client -o "recipe[yourrecipe::update_apt]"