我正在运行Vagrant 1.4.2来运行配备Chef的Ubuntu 13.10盒子。由于某种原因,找不到模板文件,运行失败并出现以下错误:
[2014-01-07T17:25:28+00:00] ERROR: template[/etc/init/verifier-tornado.conf] (transmit::default line 48) had an error: Chef::Exceptions::FileNotFound: Cookbook 'transmit' (0.1.0) does not contain a file at any of these locations:
templates/ubuntu-13.10/upstart.config.erb
templates/ubuntu/upstart.config.erb
templates/default/upstart.config.erb
This cookbook _does_ contain: ['/tmp/vagrant-chef-1/chef-solo-2/cookbooks/transmit/templates/default/upstart.conf.erb']
================================================================================
Error executing action `create` on resource 'template[/etc/init/verifier-tornado.conf]'
================================================================================
模板文件是我的自定义配方的一部分,并且在Vagrant文件中配置了cookbook路径:
config.vm.define "web" do |web|
web.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
chef.roles_path = "roles"
chef.log_level = :debug
chef.add_role "web"
end
end
此处提供了完整的运行日志:http://pastebin.com/fLNRukDr
答案 0 :(得分:1)
根据Chef客户端运行的输出,您的模板名称不正确。您正在寻找名为upstart.config.erb
的模板,但您的模板实际上名为upstart.conf.erb
(请注意config vs conf)。