summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian C. Dunn <jdunn@chef.io>2015-02-04 07:59:15 +0100
committerJulian C. Dunn <jdunn@chef.io>2015-02-04 07:59:15 +0100
commit10b1887c20ddaaeae30b4cd4f83f219410d36c4f (patch)
treee6df0e8870e2f8475284aba94b4a2c69bcb4509b
parent23cb1c709d83f1476e6a155a2ec8d0cdde14c0f9 (diff)
downloadchef-10b1887c20ddaaeae30b4cd4f83f219410d36c4f.tar.gz
Bugfix: Allow action :nothing for windows_package, ips_package, paludis_package and reboot resources.
Closes #2841.
-rw-r--r--CHANGELOG.md1
-rw-r--r--lib/chef/resource/ips_package.rb2
-rw-r--r--lib/chef/resource/paludis_package.rb2
-rw-r--r--lib/chef/resource/reboot.rb2
-rw-r--r--lib/chef/resource/windows_package.rb2
5 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27aa534125..c434650fb3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,6 +68,7 @@
* Useradd functional tests fail randomly
* Add comments to trusted_certs_content
* fixes a bug where providers would not get defined if a top-level ruby constant with the same name was already defined (ark cookbook, chrome cookbook)
+* Fix a bug in `reboot`, `ips_package`, `paludis_package`, `windows_package` resources where `action :nothing` was not permitted
## 12.0.3
* [**Phil Dibowitz**](https://github.com/jaymzh):
diff --git a/lib/chef/resource/ips_package.rb b/lib/chef/resource/ips_package.rb
index 77b3387946..c0e699e31a 100644
--- a/lib/chef/resource/ips_package.rb
+++ b/lib/chef/resource/ips_package.rb
@@ -28,7 +28,7 @@ class Chef
def initialize(name, run_context = nil)
super(name, run_context)
@resource_name = :ips_package
- @allowed_actions = [ :install, :remove, :upgrade ]
+ @allowed_actions.push(:install, :remove, :upgrade)
@accept_license = false
end
diff --git a/lib/chef/resource/paludis_package.rb b/lib/chef/resource/paludis_package.rb
index 7eddf8690b..552c96857a 100644
--- a/lib/chef/resource/paludis_package.rb
+++ b/lib/chef/resource/paludis_package.rb
@@ -28,7 +28,7 @@ class Chef
def initialize(name, run_context=nil)
super(name, run_context)
@resource_name = :paludis_package
- @allowed_actions = [ :install, :remove, :upgrade ]
+ @allowed_actions.push(:install, :remove, :upgrade)
@timeout = 3600
end
end
diff --git a/lib/chef/resource/reboot.rb b/lib/chef/resource/reboot.rb
index d6caafdea8..c111b23d2e 100644
--- a/lib/chef/resource/reboot.rb
+++ b/lib/chef/resource/reboot.rb
@@ -28,7 +28,7 @@ class Chef
super
@resource_name = :reboot
@provider = Chef::Provider::Reboot
- @allowed_actions = [:request_reboot, :reboot_now, :cancel]
+ @allowed_actions.push(:request_reboot, :reboot_now, :cancel)
@reason = "Reboot by Chef"
@delay_mins = 0
diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb
index b1ef2c288e..16cfcf865e 100644
--- a/lib/chef/resource/windows_package.rb
+++ b/lib/chef/resource/windows_package.rb
@@ -29,7 +29,7 @@ class Chef
def initialize(name, run_context=nil)
super
- @allowed_actions = [ :install, :remove ]
+ @allowed_actions.push(:install, :remove)
@resource_name = :windows_package
@source ||= source(@package_name)