Chef infra Chef打印出在Chef recipe中运行的命令的输出

Chef infra Chef打印出在Chef recipe中运行的命令的输出,chef-infra,chef-recipe,Chef Infra,Chef Recipe,我有一个厨师食谱,我需要修改,我只想看到一个命令的输出 bash 'Execute my script' do user 'root' cwd '/' code <<-EOH cmd_stdout=$(echo 'hi') echo $cmd_stdout EOH end 当我把我的厨师集中到厨房时,这个脚本就会运行。我只是没有看到任何输出。在这种情况下,查看hi的最佳方式是什么?我建议将live\u stream设置为true。它将类似于以下内容

我有一个厨师食谱,我需要修改,我只想看到一个命令的输出

bash 'Execute my script' do
  user 'root'
  cwd  '/'
  code <<-EOH
    cmd_stdout=$(echo 'hi')
    echo $cmd_stdout
  EOH
end
当我把我的厨师集中到厨房时,这个脚本就会运行。我只是没有看到任何输出。在这种情况下,查看hi的最佳方式是什么?

我建议将live\u stream设置为true。它将类似于以下内容:

execute 'apache_configtest' do
  command <<-EOH
    cmd_stdout=$(echo 'hi')
    echo $cmd_stdout
  EOH
  live_stream true
end