mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Make --oneline return one line (except with multiline output)
Currently the message prepared for --oneline mode adds a newline to the msg-string, which is then printed (adding another newline). This change removes the added newline so that successes and failures do not differ in output (except if the output is multiline).
This commit is contained in:
parent
36c1b4be0e
commit
d42eb2563b
1 changed files with 2 additions and 2 deletions
|
@ -153,9 +153,9 @@ def command_generic_msg(hostname, result, oneline, caption):
|
|||
return buf + "\n"
|
||||
else:
|
||||
if stderr:
|
||||
return "%s | %s | rc=%s | (stdout) %s (stderr) %s\n" % (hostname, caption, rc, stdout, stderr)
|
||||
return "%s | %s | rc=%s | (stdout) %s (stderr) %s" % (hostname, caption, rc, stdout, stderr)
|
||||
else:
|
||||
return "%s | %s | rc=%s | (stdout) %s\n" % (hostname, caption, rc, stdout)
|
||||
return "%s | %s | rc=%s | (stdout) %s" % (hostname, caption, rc, stdout)
|
||||
|
||||
def host_report_msg(hostname, module_name, result, oneline):
|
||||
''' summarize the JSON results for a particular host '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue