Pass in '**results' to exit_json only if results is a dict (#33910)
parent
11063dabaf
commit
6995985a52
|
@ -350,7 +350,10 @@ def main():
|
||||||
elif state == 'absent':
|
elif state == 'absent':
|
||||||
changed, result = delete(conn, module, matching_zones=zones)
|
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__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue