mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 09:54:02 -07:00
Merge various stdout callback plugins into 'default' (#41058)
This allows mixing and matching of stdout callback features
This commit is contained in:
parent
0b2ec9b11c
commit
9c5d40ff15
8 changed files with 84 additions and 30 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue