summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-04-26 16:29:35 -0700
committerTim Smith <tsmith@chef.io>2018-04-26 16:29:35 -0700
commita787f3e812dccc964411df0da1b3df6a5ee0d5ad (patch)
tree5d4c10646adc8d24323372d9eee73b49f362e7dd
parent7163130cb1209a9565d6137f3e3e6f1eacc94e0f (diff)
downloadchef-rhsm_fix.tar.gz
rhsm_register: skip the registration check if force is specifiedrhsm_fix
Thanks @donwlewis for pointing this out here: https://github.com/chef-partners/redhat-subscription-manager-cookbook/pull/43 Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/rhsm_register.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/rhsm_register.rb b/lib/chef/resource/rhsm_register.rb
index 05e748e98d..4bf9b7f1c4 100644
--- a/lib/chef/resource/rhsm_register.rb
+++ b/lib/chef/resource/rhsm_register.rb
@@ -88,7 +88,7 @@ class Chef
sensitive new_resource.sensitive
command register_command
action :run
- not_if { registered_with_rhsm? }
+ not_if { registered_with_rhsm? } unless new_resource.force
end
yum_package "katello-agent" do