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

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

问题描述

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

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?

我不想只为当前的 VM 实例更新它——我会不断地破坏和重建它们.我是否需要更改 Vagrant 基础盒中的某些内容,或者我的(物理)系统安装中的某些内容?

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?

推荐答案

使用 Vagrant 插件 vagrant-omnibus 效果很好对我来说:

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

vagrant plugin install vagrant-omnibus

然后,您可以在进行配置之前在 Vagrantfile 中简单地配置您的主厨版本:

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 用于配置 VM 的 Chef 版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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