带有执行 shell 命令和变量的人偶 运行 ruby 脚本不起作用。
puppet run ruby script with execute shell command and variable not working.
我的代码
cmd_result = %x("#{rndc}" "#{cmd_arg}" "#{zone}" in "#{view}")
puts "#{$?.exitstatus}"
puts cmd_result
不return任何输出,退出状态为1。当运行使用puppet时。
但如果我 运行 它手动它工作正常。
您(我认为)正在尝试 运行 ruby 来自 Puppet 的代码。
Puppet 在 ruby 中使用 编写的 DSL。我建议你开始 here
我的代码
cmd_result = %x("#{rndc}" "#{cmd_arg}" "#{zone}" in "#{view}")
puts "#{$?.exitstatus}"
puts cmd_result
不return任何输出,退出状态为1。当运行使用puppet时。
但如果我 运行 它手动它工作正常。
您(我认为)正在尝试 运行 ruby 来自 Puppet 的代码。
Puppet 在 ruby 中使用 编写的 DSL。我建议你开始 here