From 6e4dcf6ad5c5285f9e64111f9fb7ebebefe8e57e Mon Sep 17 00:00:00 2001 From: Anton Kvashenkin Date: Mon, 20 Mar 2017 20:24:52 +0300 Subject: [PATCH] Add `returns` property to windows_package resource The windows_package resource has been removed in windows cookbook >= 3.0. Change exit code property from `success_codes` to `returns` to meet built into chef-client 12.6+ `windows_package`. --- recipes/powershell3.rb | 2 +- recipes/powershell4.rb | 2 +- recipes/powershell5.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/powershell3.rb b/recipes/powershell3.rb index fca3b3c..9775c52 100644 --- a/recipes/powershell3.rb +++ b/recipes/powershell3.rb @@ -40,7 +40,7 @@ checksum node['powershell']['powershell3']['checksum'] installer_type :custom options '/quiet /norestart' - success_codes [0, 42, 127, 3010, 2_359_302] + returns [0, 42, 127, 3010, 2_359_302] action :install # Note that the :immediately is to immediately notify the other resource, # not to immediately reboot. The windows_reboot 'notifies' does that. diff --git a/recipes/powershell4.rb b/recipes/powershell4.rb index 983727c..206a405 100644 --- a/recipes/powershell4.rb +++ b/recipes/powershell4.rb @@ -42,7 +42,7 @@ installer_type :custom options '/quiet /norestart' action :install - success_codes [0, 42, 127, 3010, 2_359_302] + returns [0, 42, 127, 3010, 2_359_302] # Note that the :immediately is to immediately notify the other resource, # not to immediately reboot. The windows_reboot 'notifies' does that. notifies :reboot_now, 'reboot[powershell]', :immediately if node['powershell']['installation_reboot_mode'] != 'no_reboot' diff --git a/recipes/powershell5.rb b/recipes/powershell5.rb index 319997a..8931e82 100644 --- a/recipes/powershell5.rb +++ b/recipes/powershell5.rb @@ -35,7 +35,7 @@ options '/quiet /norestart' timeout node['powershell']['powershell5']['timeout'] action :install - success_codes [0, 42, 127, 3010, 2_359_302] + returns [0, 42, 127, 3010, 2_359_302] # Note that the :immediately is to immediately notify the other resource, # not to immediately reboot. The windows_reboot 'notifies' does that. notifies :reboot_now, 'reboot[powershell]', :immediately if node['powershell']['installation_reboot_mode'] != 'no_reboot'