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
commit 9c5d40ff15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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):