From 87ce50376740ddc7aaf8f03a4e1d81f8772793eb Mon Sep 17 00:00:00 2001 From: Him You Ten Date: Mon, 11 Apr 2016 02:21:15 -0400 Subject: [PATCH] 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 --- lib/ansible/modules/extras/packaging/language/composer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/packaging/language/composer.py b/lib/ansible/modules/extras/packaging/language/composer.py index 5d1ec7b1014..d5e6467e9c5 100644 --- a/lib/ansible/modules/extras/packaging/language/composer.py +++ b/lib/ansible/modules/extras/packaging/language/composer.py @@ -220,11 +220,11 @@ def main(): if rc != 0: output = parse_out(err) - module.fail_json(msg=output) + module.fail_json(msg=output, stdout=err) else: # Composer version > 1.0.0-alpha9 now use stderr for standard notification messages 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 from ansible.module_utils.basic import *