如何控制Vagrant用来配置虚拟机的Chef版本? [英] How to control the version of Chef that Vagrant uses to provision VMs?
问题描述
我不想仅仅更新VM的当前实例 - 我继续摧毁和重建那些。我需要在Vagrant基本框中更改某些内容,或者是在我的(物理)系统安装中的某些内容? 使用流浪汉插件 vagrant-omnibus 对我很好:
vagrant插件安装vagrant-omnibus
然后您可以简单地配置您的厨师版本在进行配置之前在Vagrantfile中:
config.omnibus.chef_version =:latest
您也可以指定特定版本:
config.omnibus.chef_version = '11.6.0'
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?
解决方案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'
这篇关于如何控制Vagrant用来配置虚拟机的Chef版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!