我想在食譜中運行我的食譜之一。廚師無法找到它。以下是我的樹。我嘗試的命令是廚師無法解決我的食譜名稱。即使名稱是錯誤的
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