diff options
author | Tim Smith <tsmith@chef.io> | 2018-08-02 12:24:03 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-08-02 14:19:40 -0700 |
commit | c69930c46b908b87d267fdac3170c6b663624d70 (patch) | |
tree | 0723e571f4e54cc77afbe7feb605eb7efe4476f9 /lib/chef/resource/rhsm_repo.rb | |
parent | 628b6189201c532ae0e3ff962b324018911ff389 (diff) | |
download | chef-c69930c46b908b87d267fdac3170c6b663624d70.tar.gz |
Set default_env true on RHSM resources to prevent failures
These started failing due to changes in how we manage paths when we
shell out. This ensures we have the proper path set before running.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/rhsm_repo.rb')
-rw-r--r-- | lib/chef/resource/rhsm_repo.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/resource/rhsm_repo.rb b/lib/chef/resource/rhsm_repo.rb index 54f829e79e..86857be211 100644 --- a/lib/chef/resource/rhsm_repo.rb +++ b/lib/chef/resource/rhsm_repo.rb @@ -36,6 +36,7 @@ class Chef execute "Enable repository #{new_resource.repo_name}" do command "subscription-manager repos --enable=#{new_resource.repo_name}" + default_env true action :run not_if { repo_enabled?(new_resource.repo_name) } end @@ -46,6 +47,7 @@ class Chef execute "Enable repository #{new_resource.repo_name}" do command "subscription-manager repos --disable=#{new_resource.repo_name}" + default_env true action :run only_if { repo_enabled?(new_resource.repo_name) } end |