mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
added result sanitation to registered var and to callbacks
removed time display as it only is provided by command module
This commit is contained in:
parent
fdea00880b
commit
1274ce565d
7 changed files with 31 additions and 19 deletions
|
@ -19,8 +19,6 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
||||
|
@ -55,7 +53,7 @@ class CallbackModule(CallbackBase):
|
|||
self._display.display("%s | FAILED! => %s" % (result._host.get_name(), result._result), color='red')
|
||||
|
||||
def v2_runner_on_ok(self, result):
|
||||
self._display.display("%s | SUCCESS => %s" % (result._host.get_name(), json.dumps(result._result, indent=4)), color='green')
|
||||
self._display.display("%s | SUCCESS => %s" % (result._host.get_name(), self._dump_results(result._result)), color='green')
|
||||
|
||||
def v2_runner_on_skipped(self, result):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue