1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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](cb336a5416) 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.
This commit is contained in:
Simon JAILLET 2015-03-03 20:47:13 +01:00 committed by Matt Clay
parent 56ecf602dc
commit c7b3dea395

View file

@ -159,7 +159,8 @@ def main():
output = parse_out(err) output = parse_out(err)
module.fail_json(msg=output) module.fail_json(msg=output)
else: 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) module.exit_json(changed=has_changed(output), msg=output)
# import module snippets # import module snippets