parent
cf6726397e
commit
809106ba77
1 changed files with 5 additions and 3 deletions
|
@ -20,10 +20,12 @@ DOCUMENTATION = '''
|
||||||
- set as stdout in configuration
|
- set as stdout in configuration
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
from os.path import basename
|
||||||
|
|
||||||
|
from ansible import constants as C
|
||||||
|
from ansible.module_utils._text import to_text
|
||||||
from ansible.plugins.callback import CallbackBase
|
from ansible.plugins.callback import CallbackBase
|
||||||
from ansible.utils.color import colorize, hostcolor
|
from ansible.utils.color import colorize, hostcolor
|
||||||
from ansible import constants as C
|
|
||||||
from os.path import basename
|
|
||||||
|
|
||||||
|
|
||||||
class CallbackModule(CallbackBase):
|
class CallbackModule(CallbackBase):
|
||||||
|
@ -75,7 +77,7 @@ class CallbackModule(CallbackBase):
|
||||||
task_result = "%s -> %s %s" % (task_host, task_delegate_host, msg)
|
task_result = "%s -> %s %s" % (task_host, task_delegate_host, msg)
|
||||||
|
|
||||||
if result._result.get('msg') and result._result.get('msg') != "All items completed":
|
if result._result.get('msg') and result._result.get('msg') != "All items completed":
|
||||||
task_result += " | msg: " + result._result.get('msg')
|
task_result += " | msg: " + to_text(result._result.get('msg'))
|
||||||
|
|
||||||
if result._result.get('stdout'):
|
if result._result.get('stdout'):
|
||||||
task_result += " | stdout: " + result._result.get('stdout')
|
task_result += " | stdout: " + result._result.get('stdout')
|
||||||
|
|
Loading…
Reference in a new issue