如何控制Vagrant用来配置虚拟机的Chef版本? [英] How to control the version of Chef that Vagrant uses to provision VMs?

查看:95
本文介绍了如何控制Vagrant用来配置虚拟机的Chef版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于版本0.10.10中的错误,当前Chef食谱未运行。如何将Vagrant使用的Chef版本升级到0.10.12?



我不想仅仅更新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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆