Merge pull request #2870 from towolf/add_diff_to_synchronize

Add custom diff field to synchronize module
This commit is contained in:
Brian Coca 2016-01-26 10:09:20 -05:00
commit 3239691e9e

View file

@ -418,6 +418,12 @@ def main():
out_lines=out_clean.split('\n')
while '' in out_lines:
out_lines.remove('')
if module._diff:
diff = {'prepared': out_clean}
return module.exit_json(changed=changed, msg=out_clean,
rc=rc, cmd=cmdstr, stdout_lines=out_lines,
diff=diff)
else:
return module.exit_json(changed=changed, msg=out_clean,
rc=rc, cmd=cmdstr, stdout_lines=out_lines)