Diff mode returns yaml diffs in yaml callback plugin (#48794)

* Diff mode returns yaml diffs in yaml callback plugin

* Add changelog for yaml diff mode
This commit is contained in:
Will Thames 2018-11-23 04:03:25 +10:00 committed by John R Barker
parent e39fbb9db4
commit 31ccb3c29d
3 changed files with 9 additions and 1 deletions

View file

@ -125,3 +125,6 @@ class CallbackModule(Default):
# indent by a couple of spaces
dumped = '\n '.join(dumped.split('\n')).rstrip()
return dumped
def _serialize_diff(self, diff):
return to_text(yaml.dump(diff, allow_unicode=True, width=1000, Dumper=AnsibleDumper, default_flow_style=False))