sous-chefs / powershell

Development repository for the powershell cookbook
https://supermarket.chef.io/cookbooks/powershell
Apache License 2.0
110 stars 88 forks source link

DSC recipe #15

Closed muktaa closed 10 years ago

adamedx commented 10 years ago

Also, can we add some chefspec to for this recipe?

adamedx commented 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
muktaa commented 10 years ago

This changes are moved. Please Ref: https://github.com/chef-windows/powershell/pull/22