mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
now it really is oneline
This commit is contained in:
parent
5d1d9f1505
commit
a56ff7ae54
1 changed files with 4 additions and 2 deletions
|
@ -35,10 +35,12 @@ class CallbackModule(CallbackBase):
|
|||
CALLBACK_NAME = 'oneline'
|
||||
|
||||
def _command_generic_msg(self, hostname, result, caption):
|
||||
stdout = result.get('stdout','').replace('\n', '\\n')
|
||||
if 'stderr' in result and result['stderr']:
|
||||
return "%s | %s | rc=%s | (stdout) %s (stderr) %s" % (hostname, caption, result.get('rc',0), result.get('stdout',''), result.get('stderr',''))
|
||||
stderr = result.get('stderr','').replace('\n', '\\n')
|
||||
return "%s | %s | rc=%s | (stdout) %s (stderr) %s" % (hostname, caption, result.get('rc',0), stdout, stderr)
|
||||
else:
|
||||
return "%s | %s | rc=%s | (stdout) %s" % (hostname, caption, result.get('rc',0), result.get('stdout',''))
|
||||
return "%s | %s | rc=%s | (stdout) %s" % (hostname, caption, result.get('rc',0), stdout)
|
||||
|
||||
def v2_runner_on_failed(self, result, ignore_errors=False):
|
||||
if 'exception' in result._result:
|
||||
|
|
Loading…
Reference in a new issue