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

后端 未结 6 1130
眼角桃花
眼角桃花 2020-12-07 08:26

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

6条回答
  •  眼角桃花
    2020-12-07 09:05

    There are a number of options you can specify when using Chef for provisioning. One of these is version, which allows you to specify the Chef version you want.

    For example, see the chef.version line in this extract from a Vagrantfile of mine:

    config.vm.provision :chef_solo do |chef|
       chef.version = "10.14.2"
       chef.cookbooks_path = "cookbooks"
       chef.add_recipe("vagrant_main")
     end
    

提交回复
热议问题