You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So either '' should be caught and an exception raised, or '' should work (as it does from the command line) with the not_if. I would prefer that * works, just my opinion on the matter.
Chef Version
I am using 14.2, but this is current in master
Platform Version
RHEL 7, but it doesn't matter
Replication Case
rhsm_repo '*' do
action :disable
end
Though it will appear to work, it is actually a failure:
* rhsm_repo[*] action disable
* execute[Enable repository *] action run/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.2.0/lib/chef/resource/rhsm_repo.rb:58: warning: nested repeat operator '+' and '*' was replaced with '*' in regular expression: /Repo ID:\s+*$/
(skipped due to only_if)
(up to date)
Client Output
Given above, but given again:
* rhsm_repo[*] action disable
* execute[Enable repository *] action run/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.2.0/lib/chef/resource/rhsm_repo.rb:58: warning: nested repeat operator '+' and '*' was replaced with '*' in regular expression: /Repo ID:\s+*$/
(skipped due to only_if)
(up to date)
The text was updated successfully, but these errors were encountered:
Description
The rhsm_repo resource which is a wrapper for subscription-manager repo does in fact support wildcards:
chef/lib/chef/resource/rhsm_repo.rb
Line 52 in 551ef15
However due to the not_if never matching '*' it does not work:
chef/lib/chef/resource/rhsm_repo.rb
Line 52 in 551ef15
So either '' should be caught and an exception raised, or '' should work (as it does from the command line) with the not_if. I would prefer that * works, just my opinion on the matter.
Chef Version
I am using 14.2, but this is current in master
Platform Version
RHEL 7, but it doesn't matter
Replication Case
rhsm_repo '*' do
action :disable
end
Though it will appear to work, it is actually a failure:
Client Output
Given above, but given again:
The text was updated successfully, but these errors were encountered: