使用食谱和单个文件时未找到食谱 @recipe_files

Cookbook @recipe_files not found when using recipe and single file

当我在 Windows 上使用 chef-client 12.5 结合使用食谱食谱和单个非食谱文件时,出现错误

Cookbook @recipe_files not found. If you're loading @recipe_files from another cookbook, make sure you configure the dependency in your metadata

例如,我的命令行是

chef-client -r mycookbook::default /individual_recipes/my_non_cookbook_recipe.rb

运行

chef-client -r mycookbook::default 

chef-client /individual_recipes/my_non_cookbook_recipe.rb

虽然有效。有没有办法让单个命令行工作?我不想为这个单一的食谱文件创建一个完整的单独的食谱。

谢谢。

运行 单个文件的能力有点意外。我们添加了 chef-apply 以使其更加正式,并且可能应该在 chef-client 中弃用它。不过,无论哪种情况,它都不支持这一点。