Merge various stdout callback plugins into 'default' (#41058)

This allows mixing and matching of stdout callback features
This commit is contained in:
Andrew Gaffney
2018-06-24 23:00:07 -05:00
committed by GitHub
parent 0b2ec9b11c
commit 9c5d40ff15
8 changed files with 84 additions and 30 deletions

View File

@@ -134,7 +134,7 @@ class CallbackBase(AnsiblePlugin):
self._display.deprecated(**warning)
del res['deprecations']
def _handle_exception(self, result):
def _handle_exception(self, result, use_stderr=False):
if 'exception' in result:
msg = "An exception occurred during task execution. "
@@ -146,7 +146,7 @@ class CallbackBase(AnsiblePlugin):
msg = "The full traceback is:\n" + result['exception']
del result['exception']
self._display.display(msg, color=C.COLOR_ERROR)
self._display.display(msg, color=C.COLOR_ERROR, stderr=use_stderr)
def _get_diff(self, difflist):