mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Pass in '**results' to exit_json only if results is a dict (#33910)
This commit is contained in:
parent
11063dabaf
commit
6995985a52
1 changed files with 4 additions and 1 deletions
|
@ -350,7 +350,10 @@ def main():
|
|||
elif state == 'absent':
|
||||
changed, result = delete(conn, module, matching_zones=zones)
|
||||
|
||||
module.exit_json(changed=changed, result=result, **result)
|
||||
if isinstance(result, dict):
|
||||
module.exit_json(changed=changed, result=result, **result)
|
||||
else:
|
||||
module.exit_json(changed=changed, result=result)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue