mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fix #8047
Ensure that json is returned when only updating the cache and in check mode
This commit is contained in:
@@ -204,6 +204,9 @@ def main():
|
|||||||
if not p['name']:
|
if not p['name']:
|
||||||
module.exit_json(changed=True, msg='updated the package master lists')
|
module.exit_json(changed=True, msg='updated the package master lists')
|
||||||
|
|
||||||
|
if p['update_cache'] and module.check_mode and not p['name']:
|
||||||
|
module.exit_json(changed=True, msg='Would have updated the package cache')
|
||||||
|
|
||||||
if p['name']:
|
if p['name']:
|
||||||
pkgs = p['name'].split(',')
|
pkgs = p['name'].split(',')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user