summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Coca <bcoca@users.noreply.github.com>2018-02-23 15:12:14 -0500
committerGitHub <noreply@github.com>2018-02-23 15:12:14 -0500
commit2f13ddbd694e8c6ae2f5d1737796c7a75109eda5 (patch)
treeee0081fd88aabee5c03a3bc5ef466187d9fa28c7
parentef40e5e3b21fe05df3ed5691360ea51ce84a66c2 (diff)
downloadansible-2f13ddbd694e8c6ae2f5d1737796c7a75109eda5.tar.gz
debug should have item (#36534)
* debug should have item * item should only be present when var
-rw-r--r--lib/ansible/plugins/callback/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ansible/plugins/callback/__init__.py b/lib/ansible/plugins/callback/__init__.py
index 6c9efeeb2a..b06e88a439 100644
--- a/lib/ansible/plugins/callback/__init__.py
+++ b/lib/ansible/plugins/callback/__init__.py
@@ -77,7 +77,7 @@ class CallbackBase(AnsiblePlugin):
if options is not None:
self.set_options(options)
- self._hide_in_debug = ('changed', 'failed', 'item', 'skipped', 'invocation')
+ self._hide_in_debug = ('changed', 'failed', 'skipped', 'invocation')
''' helper for callbacks, so they don't all have to include deepcopy '''
_copy_result = deepcopy
@@ -239,6 +239,8 @@ class CallbackBase(AnsiblePlugin):
if task_name in ['debug']:
for hideme in self._hide_in_debug:
result.pop(hideme, None)
+ if 'msg' in result:
+ result.pop('item', None)
def set_play_context(self, play_context):
pass