mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Make diff header lines more explicit about what the diff is about
This gives a more readable output when producing diff for a task with multiple items (with_items).
This commit is contained in:
@@ -126,6 +126,7 @@ class ActionModule(object):
|
||||
dest_contents = base64.b64decode(dest_contents)
|
||||
else:
|
||||
raise Exception("unknown encoding, failed: %s" % dest_result.result)
|
||||
diff['before_header'] = destination
|
||||
diff['before'] = dest_contents
|
||||
|
||||
src = open(source)
|
||||
@@ -137,6 +138,7 @@ class ActionModule(object):
|
||||
diff['src_larger'] = utils.MAX_FILE_SIZE_FOR_DIFF
|
||||
else:
|
||||
src.seek(0)
|
||||
diff['after_header'] = source
|
||||
diff['after'] = src.read()
|
||||
|
||||
return diff
|
||||
|
||||
Reference in New Issue
Block a user