mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-03 06:49:10 -07:00
rhsm_repository: update returned "repositories" when using "purge=true" (#6676)
In case the "purge" option was enabled, the "repositories" element in the returned JSON was not updated with the repositories disabled by that option.
This commit is contained in:
parent
068a799bba
commit
ffb9b6ff96
2 changed files with 9 additions and 0 deletions
|
@ -226,6 +226,9 @@ def repository_modify(module, state, name, purge=False):
|
|||
diff_after.join("Repository '{repoid}' is disabled for this system\n".format(repoid=repoid))
|
||||
results.append("Repository '{repoid}' is disabled for this system".format(repoid=repoid))
|
||||
rhsm_arguments.extend(['--disable', repoid])
|
||||
for updated_repo in updated_repo_list:
|
||||
if updated_repo['id'] in difference:
|
||||
updated_repo['enabled'] = False
|
||||
|
||||
diff = {'before': diff_before,
|
||||
'after': diff_after,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue