我正在尝试编写一个自定义厨师食谱,以便在Linux实例上安装Cloudhealth Agent。
registration_code = "unique-registration-code"
execute "Install Agent" do
command "wget https://s3.amazonaws.com/remote-collector/agent/install_cht_perfmon.sh -O install_cht_perfmon.sh; sh install_cht_perfmon.sh 14 #{registration_code} aws; exit 0"
ignore_failure true
not_if "test -d /opt/cht_perfmon"
only_if { node.attribute?(:ec2) }
end