mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Merge pull request #1560 from dagwieers/module-output-consistency
Make module output more consistent wrt. changed/failed
This commit is contained in:
commit
03f4b0f923
2 changed files with 24 additions and 40 deletions
|
@ -594,6 +594,8 @@ class AnsibleModule(object):
|
|||
def exit_json(self, **kwargs):
|
||||
''' return from the module, without error '''
|
||||
self.add_path_info(kwargs)
|
||||
if not kwargs.has_key('changed'):
|
||||
kwargs['changed'] = False
|
||||
print self.jsonify(kwargs)
|
||||
sys.exit(0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue