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 1ad01c3335
)
This commit is contained in:
parent
2e3a2a5cc3
commit
01a4d265e3
@ -292,7 +292,7 @@ workflows:
|
|||||||
stack_id: <% $.plan_name %>
|
stack_id: <% $.plan_name %>
|
||||||
output_key: BlacklistedHostnames
|
output_key: BlacklistedHostnames
|
||||||
publish:
|
publish:
|
||||||
blacklisted_hostnames: <% task().result.output.output_value %>
|
blacklisted_hostnames: <% task().result.output.output_value.where($ != "") %>
|
||||||
on-success: get_config
|
on-success: get_config
|
||||||
on-error: send_message
|
on-error: send_message
|
||||||
publish-on-error:
|
publish-on-error:
|
||||||
|
Loading…
Reference in New Issue
Block a user