mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
rshm_repository: reduce execution time when changed == False (#458)
Co-authored-by: Giovanni Sciortino <gsciorti@redhat.com>
This commit is contained in:
parent
519162443f
commit
7bdd78b053
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
|||
bugfixes:
|
||||
- rshm_repository - reduce execution time when changed is False
|
||||
(https://github.com/ansible-collections/community.general/pull/458).
|
|
@ -217,7 +217,7 @@ def repository_modify(module, state, name, purge=False):
|
|||
'before_header': "RHSM repositories",
|
||||
'after_header': "RHSM repositories"}
|
||||
|
||||
if not module.check_mode:
|
||||
if not module.check_mode and changed:
|
||||
rc, out, err = run_subscription_manager(module, rhsm_arguments)
|
||||
results = out.splitlines()
|
||||
module.exit_json(results=results, changed=changed, repositories=updated_repo_list, diff=diff)
|
||||
|
|
Loading…
Reference in a new issue