From e2a7ba35dbc2b9af5ad1858a64a7bb460e109a0b Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 4 Feb 2016 12:44:45 -0800 Subject: [PATCH] Fix --diff to respect no_log task parameter. --- lib/ansible/plugins/action/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index d201850d64..fe8bfc398b 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -615,4 +615,7 @@ 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 ]]" + return diff