当我尝试运行Chef-solo时无法找到配置文件

时间:2019-06-25 01:53:57

标签: ruby chef chef-solo

当我在服务器上运行ChefSolo时,它抛出此错误,表示即使实际上位于Chef目录下,也找不到我的配置文件(solo.rb和nodes文件)。

chef-solo -c solo.rb -j ".\nodes\test.json"
[2019-06-24T07:04:56+00:00] DEBUG: Reading products and relationships...
[2019-06-24T07:04:56+00:00] DEBUG: Successfully read products and relationships
[2019-06-24T07:04:56+00:00] DEBUG: Searching for the following licenses: ["infra-client", "inspec"]
[2019-06-24T07:04:56+00:00] DEBUG: Found license chef_infra_client at C:/Users/simon.lam/.chef/accepted_licenses/chef_in
fra_client
[2019-06-24T07:04:56+00:00] DEBUG: Found license inspec at C:/Users/simon.lam/.chef/accepted_licenses/inspec
[2019-06-24T07:04:56+00:00] DEBUG: Missing licenses remaining: []
[2019-06-24T07:04:56+00:00] DEBUG: All licenses present
[2019-06-24T07:04:56+00:00] FATAL: Cannot load configuration from .\nodes\local.json

PS C:\git\chef> chef -v
Chef Development Kit Version: 4.0.60
chef-client version: 15.0.300
delivery version: master (9d07501a3b347cc687c902319d23dc32dd5fa621)
berks version: 7.0.8
kitchen version: 2.2.5
inspec version: 4.3.2

当我指定solo.rb和节点配置文件的完整路径时,它停止抱怨

我尝试安装Chef WorkStation,但仍然失败,并出现相同的错误,找不到solo.rb。只是想知道我是否错过了任何配置来重新指向厨师以查看自己的git厨师目录(C:\ git \ chef ...我所有的厨师食谱,节点和solo.rb都在这里)。但是Chef-solo一直在C:\ solo.rb中寻找solo.rb,不确定为什么这样做(也许相对路径不起作用-潜在的错误)。

谢谢

0 个答案:

没有答案