运行 chef client 命令时,我收到警告 - 未找到配置文件

While running chef client command i am getting a warning - No config file found

提问人:Abhinav A Tewary 提问时间:8/27/2023 最后编辑:seshadri_cAbhinav A Tewary 更新时间:8/28/2023 访问量:70

问:

运行 chef client 命令时,我收到以下警告。chef-client -zr "recipe[test-cookbook::test-recipe]"

[2023-08-27T10:00:19+00:00] WARN: No config file found or specified on command line. Using command line options instead.
Chef Infra Client, version 18.2.7
Patents: https://www.chef.io/patents
Infra Phase starting
Resolving cookbooks for run list: ["test-cookbook::test-recipe"]
Synchronizing cookbooks:
  - test-cookbook (0.1.0)
Installing cookbook gem dependencies:
Compiling cookbooks...
Loading Chef InSpec profile files:
Loading Chef InSpec input files:
Loading Chef InSpec waiver files:
Converging 0 resources

Running handlers:
Running handlers complete
Infra Phase complete, 0/0 resources updated in 02 seconds

PS:我已经在食谱中正确更新了代码

配方如下(语法也可以):

file '/myfile' do
  content 'Welcome to Technical Guftgu'
  action :create
end
chef-infra chef-客户端

评论

0赞 seshadri_c 8/28/2023
如警告所示,chef-client 没有配置文件。此外,您正在使用 ,(本地模式)。这意味着您需要将说明书、环境、角色存储在特定的目录结构中。对于您的用例,这应该给出一个想法。-z

答: 暂无答案