【发布时间】:2023-03-04 02:57:01
【问题描述】:
我正在尝试由厨师提供虚拟机。我已经编写了 default.rb 脚本并保留了我想要复制到 VM 的文件。
cookbook_file "/etc/hosts" do
source "etc_hosts"
mode 0644
owner "root"
group "root"
end
end
这失败并出现以下错误..
Error executing action `create` on resource 'cookbook_file[/etc/hosts]'
==> default: ================================================================================
==> default:
==> default: Net::HTTPServerException
==> default: ------------------------
==> default: 404 "Not Found"
文件已正确放置。 当尝试再次运行厨师脚本时,这是成功的。 它在交替运行时失败。有什么我可能遗漏的吗?
【问题讨论】:
-
下一个资源声明是什么?另外,能否请您用更多日志更新上述错误?
-
在您提供的 sn-p 中,所有内容都用
#注释,那么您希望运行什么?信息太少,不清楚 -
没有太多日志,除了 404 not found 这是在下一次运行时解决的备用运行。
-
@MohitArora - 您能否更新一下您在配方中调用的下一个资源,即“default.rb”?
标签: vagrant chef-infra chef-recipe chef-solo