1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

no exceptions with less than 3 'v's

This commit is contained in:
Brian Coca 2015-04-24 21:49:28 -04:00
parent 75b969e2d7
commit 950aa8511a
2 changed files with 4 additions and 0 deletions

View file

@ -37,6 +37,8 @@ class CallbackModule(CallbackBase):
pass pass
def v2_runner_on_failed(self, result, ignore_errors=False): def v2_runner_on_failed(self, result, ignore_errors=False):
if 'exception' in result._result and self._display.verbosity < 3:
del result._result['exception']
self._display.display("fatal: [%s]: FAILED! => %s" % (result._host.get_name(), json.dumps(result._result, ensure_ascii=False)), color='red') self._display.display("fatal: [%s]: FAILED! => %s" % (result._host.get_name(), json.dumps(result._result, ensure_ascii=False)), color='red')
def v2_runner_on_ok(self, result): def v2_runner_on_ok(self, result):

View file

@ -38,6 +38,8 @@ class CallbackModule(CallbackBase):
pass pass
def v2_runner_on_failed(self, result, ignore_errors=False): def v2_runner_on_failed(self, result, ignore_errors=False):
if 'exception' in result._result and self._display.verbosity < 3:
del result._result['exception']
self._display.display("%s | FAILED! => %s" % (result._host.get_name(), result._result), color='red') self._display.display("%s | FAILED! => %s" % (result._host.get_name(), result._result), color='red')
def v2_runner_on_ok(self, result): def v2_runner_on_ok(self, result):