From 01a4d265e30a0a0f03db25e5955da4d1b7b27a82 Mon Sep 17 00:00:00 2001 From: Jose Luis Franco Arza Date: Mon, 6 Aug 2018 15:28:22 +0200 Subject: [PATCH] Avoid getting one-empty-element-list in blacklisted_hostnames. When obtaining the output from the heat.stack_output_show action [0], if no parameter is specified in the stack, then the action returns a list of one empty string ['']. This is causing some error when calling tripleo.ansible-playbook workbook, as self.blacklisted_hostnames get set, as the argument passed is a non-empty list [1], and the result is that the argument '!' is always passed to the --limit option when calling ansible-playbook. [0] - https://github.com/openstack/tripleo-common/blob/master/workbooks/deployment.yaml#L365 [1] - https://github.com/openstack/tripleo-common/blob/master/tripleo_common/actions/ansible.py#L461-L464 Change-Id: I559d5ec5548ca24490a204809c7167660c307bac Closes-Bug: #1785597 (cherry picked from commit 1ad01c3335b3f788b8c84f49ab82cf508c0b65c0) --- workbooks/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workbooks/deployment.yaml b/workbooks/deployment.yaml index c12de8fba..eb860fded 100644 --- a/workbooks/deployment.yaml +++ b/workbooks/deployment.yaml @@ -292,7 +292,7 @@ workflows: stack_id: <% $.plan_name %> output_key: BlacklistedHostnames publish: - blacklisted_hostnames: <% task().result.output.output_value %> + blacklisted_hostnames: <% task().result.output.output_value.where($ != "") %> on-success: get_config on-error: send_message publish-on-error: