added stdout and stderr outputs (#1900)
* added stdout and stderr outputs Added stdout and stderr outputs of the results from composer as the current msg output strips \n so very hard to read when debugging * using stdout for fail_json using stdout for fail_json so we get the stdout_lines array
This commit is contained in:
parent
0405c54dba
commit
f99576749a
1 changed files with 2 additions and 2 deletions
|
@ -220,11 +220,11 @@ def main():
|
||||||
|
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
output = parse_out(err)
|
output = parse_out(err)
|
||||||
module.fail_json(msg=output)
|
module.fail_json(msg=output, stdout=err)
|
||||||
else:
|
else:
|
||||||
# Composer version > 1.0.0-alpha9 now use stderr for standard notification messages
|
# Composer version > 1.0.0-alpha9 now use stderr for standard notification messages
|
||||||
output = parse_out(out + err)
|
output = parse_out(out + err)
|
||||||
module.exit_json(changed=has_changed(output), msg=output)
|
module.exit_json(changed=has_changed(output), msg=output, stdout=out+err)
|
||||||
|
|
||||||
# import module snippets
|
# import module snippets
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
|
|
Loading…
Reference in a new issue