我想在食谱中运行我的食谱之一。厨师无法找到它。以下是我的树。我尝试的命令是厨师无法解决我的食谱名称。即使名称是错误的
sudo chef-client --local-mode -runlist "recipe[apache::server]"
我甚至与食谱
sudo chef-client --local-mode -runlist "recipe[cookbooks/apache::server]"
的路径尝试下面是我的错误。奇怪的是,它在错误中显示的食谱名称是unlist
,这不是我的食谱名称。我的食谱名称是apache
。
[[email protected] ~]$ sudo chef-client --local-mode -runlist "recipe[apache::server]"
[2017-06-18T07:24:32+00:00] WARN: No config file found or specified on command line, using command line options.
Starting Chef Client, version 12.14.89
resolving cookbooks for run list: ["unlist"]
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: unlist
Expanded Run List:
------------------
* unlist
Platform:
---------
x86_64-linux
Running handlers:
[2017-06-18T07:24:34+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-06-18T07:24:34+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2017-06-18T07:24:34+00:00] FATAL: Stacktrace dumped to /root/.chef/local-mode-cache/cache/chef-stacktrace.out
[2017-06-18T07:24:34+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-06-18T07:24:34+00:00] ERROR: 412 "Precondition Failed"
[2017-06-18T07:24:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
树结构
[[email protected] ~]$ tree
.
|-- cookbooks
| `-- apache
| |-- Berksfile
| |-- chefignore
| |-- metadata.rb
| |-- README.md
| |-- recipes
| | |-- default.rb
| | `-- server.rb
| |-- spec
| | |-- spec_helper.rb
| | `-- unit
| | `-- recipes
| | |-- default_spec.rb
| | `-- server_spec.rb
| `-- test
| `-- recipes
| |-- default_test.rb
| `-- server.rb
|-- delete.rb
|-- hello.rb
|-- hellotodelet.rb
`-- nodes
`-- localhost.json
是的,我后来发现并意识到我的错误。日Thnx – user3310115