ruby - 当我尝试运行 chef-solo 时无法找到配置文件
问题描述
当我在我的服务器上运行 ChefSolo 时,它抛出了这个错误,说它找不到我的配置文件(solo.rb 和节点文件),即使它实际上在我的 Chef 目录下。
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 chef 目录(C:\git\chef...我所有的厨师食谱、节点和 solo.rb 都在这里)。但是 chef-solo 一直在 C:\solo.rb 中寻找 solo.rb,不知道为什么会这样(可能相对路径不起作用 - 潜在的错误)。
谢谢
解决方案
推荐阅读
- python - Python Selenium:难以找到密码元素
- c# - Interop.Outlook 继续运行
- javascript - Wordpress 管理区域 - TypeError: $ 不是函数。(在 '$(".tab_content")' 中,'$' 未定义)
- vue.js - vue搭建了一个产品上传
- ms-access - Access 2016 - 在 Access 2016 中打开 .mdb(在 Access 2003 中创建)时表单消失
- django - Django 渲染不返回?
- javascript - 如何让 cloudantDb.search 返回所有记录而不是限制 25 和书签
- c# - C# 从具有 SystemReflection 的实体集中的结果中获取属性
- python - 在生产模式下在 Flask 中启用调试模式
- synchronization - Matlab/Simulink/EmbeddedCoder 共享数据同步