Closed muktaa closed 10 years ago
An example of using windows_reboot
for rebooting would be the following:
# Do some stuff that might need a reboot
# May need to set attribute to allow reboot to happen on run failure
# See windows cookbook for details
windows_reboot 'Reboot If needed' do
only_if { node['powershell']['installation_reboot_mode'] && reboot_pending? }
notifies :run, 'EndthisRun'
end
ruby_block 'EndThisRun' do
block do
raise 'Ending Chef run to reboot after PowerShell installation which required a restart'
end
end
This changes are moved. Please Ref: https://github.com/chef-windows/powershell/pull/22
Also, can we add some chefspec to for this recipe?