The kolla_toolbox Ansible module executes as-hoc ansible commands in the
kolla_toolbox container, and parses the output to make it look as if
ansible-playbook executed the command. Currently however, this module
sometimes fails to catch failures of the underlying command, and also
sometimes shows tasks as 'ok' when the underlying command was changed.
This has been tested both before and after the upgrade to ansible 2.8.
This change fixes this issue by configuring ansible to emit output in
JSON format, to make parsing simpler. We can now pick up errors and
changes, and signal them to the caller.
This change also adds an ansible playbook, tests/test-kolla-toolbox.yml,
that can be executed to test the module. It's not currently integrated
with any CI jobs.
Note that this change cannot be backported as the JSON output callback
plugin was added in Ansible 2.5.
Reviewed: https:/ /review. opendev. org/682340 /git.openstack. org/cgit/ openstack/ kolla-ansible/ commit/ ?id=70b515bf122 5e56b7df8167704 3d75be4bbb1ab4
Committed: https:/
Submitter: Zuul
Branch: master
commit 70b515bf1225e56 b7df81677043d75 be4bbb1ab4
Author: Mark Goddard <email address hidden>
Date: Mon Sep 16 11:27:48 2019 +0100
Catch errors and changes in kolla_toolbox module
The kolla_toolbox Ansible module executes as-hoc ansible commands in the playbook executed the command. Currently however, this module
kolla_toolbox container, and parses the output to make it look as if
ansible-
sometimes fails to catch failures of the underlying command, and also
sometimes shows tasks as 'ok' when the underlying command was changed.
This has been tested both before and after the upgrade to ansible 2.8.
This change fixes this issue by configuring ansible to emit output in
JSON format, to make parsing simpler. We can now pick up errors and
changes, and signal them to the caller.
This change also adds an ansible playbook, tests/test- kolla-toolbox. yml,
that can be executed to test the module. It's not currently integrated
with any CI jobs.
Note that this change cannot be backported as the JSON output callback
plugin was added in Ansible 2.5.
Change-Id: I8236dd4165f760 c819ca972b75cbe bc62015fada
Closes-Bug: #1844114