From f4bcb1c17a08ec4b213922b04133d68126e39986 Mon Sep 17 00:00:00 2001 From: Veselin Todorov Date: Tue, 10 Sep 2019 10:49:35 +0100 Subject: [PATCH 1/3] Adding an optional timeout to reboot --- CHANGELOG.md | 3 +++ metadata.rb | 2 +- windows_reboot.rb | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 windows_reboot.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 006504e..d469354 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # powershell Cookbook CHANGELOG This file is used to list changes made in each version of the powershell cookbook. +## 6.1.3 (2019-09-10) + +- Added an optional reboot delay ## 6.1.3 (2018-09-20) diff --git a/metadata.rb b/metadata.rb index 8662768..d462494 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'cookbooks@chef.io' license 'Apache-2.0' description 'Installs/Configures PowerShell on the Windows platform' -version '6.1.3' +version '6.1.4' supports 'windows' depends 'windows', '>= 3.0' diff --git a/windows_reboot.rb b/windows_reboot.rb new file mode 100644 index 0000000..5964fef --- /dev/null +++ b/windows_reboot.rb @@ -0,0 +1,9 @@ +# this recipe can be called from any recipe for windows reboot. Just specify default['powershell']['reboot_notifier'] +node.default['windows']['allow_pending_reboots'] = true +node.default['windows']['allow_reboot_on_failure'] = true +node.default['windows']['delay'] = 0 + +reboot 'powershell' do + delay_mins node['windows']['delay'] + action :nothing +end From 3fda2c4a4d5dd52881206173acc341830d12c19c Mon Sep 17 00:00:00 2001 From: Veselin Todorov Date: Tue, 10 Sep 2019 10:55:15 +0100 Subject: [PATCH 2/3] Updating windows_reboot.rb Signed-off-by: Veselin Todorov veselin.todorov@fourth.com --- recipes/windows_reboot.rb | 2 ++ windows_reboot.rb | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 windows_reboot.rb diff --git a/recipes/windows_reboot.rb b/recipes/windows_reboot.rb index 090a0ba..5964fef 100644 --- a/recipes/windows_reboot.rb +++ b/recipes/windows_reboot.rb @@ -1,7 +1,9 @@ # this recipe can be called from any recipe for windows reboot. Just specify default['powershell']['reboot_notifier'] node.default['windows']['allow_pending_reboots'] = true node.default['windows']['allow_reboot_on_failure'] = true +node.default['windows']['delay'] = 0 reboot 'powershell' do + delay_mins node['windows']['delay'] action :nothing end diff --git a/windows_reboot.rb b/windows_reboot.rb deleted file mode 100644 index 5964fef..0000000 --- a/windows_reboot.rb +++ /dev/null @@ -1,9 +0,0 @@ -# this recipe can be called from any recipe for windows reboot. Just specify default['powershell']['reboot_notifier'] -node.default['windows']['allow_pending_reboots'] = true -node.default['windows']['allow_reboot_on_failure'] = true -node.default['windows']['delay'] = 0 - -reboot 'powershell' do - delay_mins node['windows']['delay'] - action :nothing -end From 1d94682b2189233807035969ee73eb9d82c0bf4f Mon Sep 17 00:00:00 2001 From: Veselin Todorov Date: Tue, 10 Sep 2019 10:55:15 +0100 Subject: [PATCH 3/3] Updating windows_reboot.rb Signed-off-by: Veselin Todorov veselin.todorov@fourth.com Signed-off-by: Veselin Todorov --- recipes/windows_reboot.rb | 2 ++ windows_reboot.rb | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 windows_reboot.rb diff --git a/recipes/windows_reboot.rb b/recipes/windows_reboot.rb index 090a0ba..5964fef 100644 --- a/recipes/windows_reboot.rb +++ b/recipes/windows_reboot.rb @@ -1,7 +1,9 @@ # this recipe can be called from any recipe for windows reboot. Just specify default['powershell']['reboot_notifier'] node.default['windows']['allow_pending_reboots'] = true node.default['windows']['allow_reboot_on_failure'] = true +node.default['windows']['delay'] = 0 reboot 'powershell' do + delay_mins node['windows']['delay'] action :nothing end diff --git a/windows_reboot.rb b/windows_reboot.rb deleted file mode 100644 index 5964fef..0000000 --- a/windows_reboot.rb +++ /dev/null @@ -1,9 +0,0 @@ -# this recipe can be called from any recipe for windows reboot. Just specify default['powershell']['reboot_notifier'] -node.default['windows']['allow_pending_reboots'] = true -node.default['windows']['allow_reboot_on_failure'] = true -node.default['windows']['delay'] = 0 - -reboot 'powershell' do - delay_mins node['windows']['delay'] - action :nothing -end