diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2015-07-26 23:14:07 -0400 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2015-07-26 23:14:07 -0400 |
commit | a56ff7ae54d93d2c930d2deb59362a7913830d54 (patch) | |
tree | cf128e81104e203a31c57cd2c33925c1097792a1 | |
parent | 5d1d9f15058f01115f2bb551e445e5d02c535afc (diff) | |
download | ansible-a56ff7ae54d93d2c930d2deb59362a7913830d54.tar.gz |
now it really is oneline
-rw-r--r-- | lib/ansible/plugins/callback/oneline.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ansible/plugins/callback/oneline.py b/lib/ansible/plugins/callback/oneline.py index 15a8aee3c8..a99b680c05 100644 --- a/lib/ansible/plugins/callback/oneline.py +++ b/lib/ansible/plugins/callback/oneline.py @@ -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: |