summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2015-10-24 15:23:12 -0400
committerBrian Coca <brian.coca+git@gmail.com>2015-10-24 15:23:12 -0400
commit8ce864db6f288c7e65f34d374b5e29838c229b3e (patch)
tree900a3e1678c7c9324acacf7d21055c344d2c9e04 /lib/ansible/plugins
parent92dd563a7591fa81058c51e0585d7cdbab7ccafc (diff)
downloadansible-8ce864db6f288c7e65f34d374b5e29838c229b3e.tar.gz
sanatize results
Diffstat (limited to 'lib/ansible/plugins')
-rw-r--r--lib/ansible/plugins/callback/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ansible/plugins/callback/__init__.py b/lib/ansible/plugins/callback/__init__.py
index 612266a9f7..aaea1a525c 100644
--- a/lib/ansible/plugins/callback/__init__.py
+++ b/lib/ansible/plugins/callback/__init__.py
@@ -27,6 +27,7 @@ from copy import deepcopy
from ansible.compat.six import string_types
from ansible import constants as C
+from ansible.vars import strip_internal_keys
from ansible.utils.unicode import to_unicode
__all__ = ["CallbackBase"]
@@ -56,10 +57,7 @@ class CallbackBase:
indent = 4
# All result keys stating with _ansible_ are internal, so remove them from the result before we output anything.
- abridged_result = result.copy()
- for k in abridged_result.keys():
- if isinstance(k, string_types) and k.startswith('_ansible_'):
- del abridged_result[k]
+ abridged_result = strip_internal_keys(result)
# Remove invocation unless verbosity is turned up or the specific
# callback wants to keep it