How to control the version of Chef that Vagrant uses to provision VMs?

Steve Bennett picture Steve Bennett · Jul 4, 2012 · Viewed 14.9k times · Source

A current Chef recipe isn't running because of a bug in version 0.10.10. How can I upgrade the version of Chef that Vagrant uses, to 0.10.12?

I don't want to just update it for the current instance of the VM - I keep destroying and rebuilding those. Do I need to change something in the Vagrant base box, or something in my (physical) system's installation?

Answer

mirkokiefer picture mirkokiefer · Aug 13, 2013

Using the Vagrant plugin vagrant-omnibus worked great for me:

vagrant plugin install vagrant-omnibus

You can then simply configure your chef version in the Vagrantfile before doing the provisioning:

config.omnibus.chef_version = :latest

You can also specify a specific version:

config.omnibus.chef_version = '11.6.0'