我在Scalarium上使用 Chef来下载代理并在其上运行各种命令。我正在尝试在配方中编写一个 shell 脚本来执行此操作。
file "/etc/profile.d/blah.sh" do
content <<-EOH
sudo -sH
<Retrieve file and run some commands>
EOH
end
当我在 Scalarium 中运行配方时,没有发生错误,但命令也没有运行。命令本身没有错误,因为我已经在我的计算机上运行了它们。
食谱肯定是读过的,因为厨师日志包含Processing file[/etc/profile.d/blah.sh] on blah.localdomain
.
我以前从未使用过 Chef,我需要做其他事情来告诉它执行 shell 脚本吗?