From c7b3dea3955f48f0a1730ab260e7991267c7d02d Mon Sep 17 00:00:00 2001 From: Simon JAILLET Date: Tue, 3 Mar 2015 20:47:13 +0100 Subject: [PATCH] composer: Fix `changed` status Fix `changed` status that always returns False with composer. This [previous PR](https://github.com/ansible/ansible-modules-extras/pull/61) had fixed the issue but because of a [Composer recent change](https://github.com/composer/composer/commit/cb336a5416595efa321c024735e6452c9c7df106) stderr is now used for reporting information meant for humans while stdout is more for the output of the command. This PR would definilty solve this issue. --- lib/ansible/modules/extras/packaging/language/composer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/packaging/language/composer.py b/lib/ansible/modules/extras/packaging/language/composer.py index f788f53dd5c..23d9dc5031e 100644 --- a/lib/ansible/modules/extras/packaging/language/composer.py +++ b/lib/ansible/modules/extras/packaging/language/composer.py @@ -159,7 +159,8 @@ def main(): output = parse_out(err) module.fail_json(msg=output) else: - output = parse_out(out) + # 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) # import module snippets