1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Also hide the before state of files with --diff and no_log

This commit is contained in:
Toshio Kuratomi 2016-02-08 22:05:46 -08:00
parent 06b2400aae
commit 0f15e59cb2

View file

@ -617,7 +617,10 @@ class ActionBase(with_metaclass(ABCMeta, object)):
diff['after_header'] = 'dynamically generated'
diff['after'] = source
if self._play_context.no_log and 'after' in diff:
diff["after"] = " [[ Diff output has been hidden because 'no_log: true' was specified for this result ]]"
if self._play_context.no_log:
if 'before' in diff:
diff["before"] = ""
if 'after' in diff:
diff["after"] = " [[ Diff output has been hidden because 'no_log: true' was specified for this result ]]"
return diff