fix unixy when debug's msg is not text (#36882)

fixes #36850
pull/36885/head
Brian Coca 6 years ago committed by Jordan Borean
parent cf6726397e
commit 809106ba77

@ -20,10 +20,12 @@ DOCUMENTATION = '''
- 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.utils.color import colorize, hostcolor
from ansible import constants as C
from os.path import basename
class CallbackModule(CallbackBase):
@ -75,7 +77,7 @@ class CallbackModule(CallbackBase):
task_result = "%s -> %s %s" % (task_host, task_delegate_host, msg)
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'):
task_result += " | stdout: " + result._result.get('stdout')

Loading…
Cancel
Save