【发布时间】:2020-05-15 03:49:20
【问题描述】:
我目前正在尝试在厨师资源中使用重启资源:
reboot 'ADS Install Complete' do
action :nothing
reason 'Cannot continue Chef run without a reboot.'
only_if {reboot_pending?}
end
...
execute 'Initialize ADS Configuration INI' do
command "\"#{node["ads-tfs-ini"]["tfsconfig_path"]}\" unattend \/create \/type:#{node["ads-tfs-ini"]["Scenario"]} \/unattendfile:\"#{node["ads-tfs-ini"]["unattend_file_path"]}\""
only_if { ! "#{ENV['JAVA_HOME']}".to_s.empty? }
notifies :request_reboot, 'reboot[ADS Install Complete]', :delayed
end
我得到一个无限循环的重启(客户端重启-->主厨客户端运行-->主厨客户端重新运行 run_list--客户端重启-->...)。我怎样才能只重启一次?
【问题讨论】:
标签: windows chef-infra reboot