【发布时间】:2014-03-07 05:55:40
【问题描述】:
使用 chef-solo,我正在尝试启动一个安装 git 的简单 VM。
我有一个“cookbooks”目录,还有一个 Vagrantfile。
-cookbooks
-Vagrantfile
流浪文件
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "centos_64"
config.vm.network "forwarded_port", guest: 80, host: 8085
config.omnibus.chef_version = :latest
...
config.vm.provision :chef_solo do |chef|
chef.add_recipe "build-essential"
chef.add_recipe "dmg"
chef.add_recipe "yum"
chef.add_recipe "git"
end
end
我将git 食谱克隆到我的食谱目录。但是,我遇到了一个问题:
[2014-03-06T21:09:58+00:00] ERROR: Cookbook runit not found. If you're loading
runit from another cookbook, make sure you configure the dependency in your
metadata
[2014-03-06T21:09:58+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)
与其继续向我的 Vagrantfile 添加更多说明书依赖项,不如处理依赖项的正确方法是什么?
【问题讨论】: