我正在为应用程序部署编写一些厨师食谱。 我解压缩代码然后编辑它。它看起来是这样的: bash 'admin-init' do
user "root"
code <<-EOH
<here I extract the code>
EOH
end
execute 'configure' do
file = Chef::Util::FileEdit
我是厨师新手,开始了我的第一课。在没有特权的情况下运行我的配方时,会抛出异常(我很高兴),但也创建了一个空白的'hello.txt'。有没有误导这个空白'hello.txt'? hello_recipe.rb file 'hello.txt' do
content 'Welcome to Chef'
end
>chef-apply hello_recipe.rb #=> chef-