From 23e7980581533a63ea31993c8221007647dfd7ce Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Tue, 22 Sep 2020 11:00:28 +0530 Subject: [PATCH] [Train] Check for existence of stack In a predeployed environment only check for blacklisted list if the stack exists. This has to be fixed in cli-enable-ssh-admin.yaml for ussuri and later. Related-Bug: #1896505 Change-Id: Ib01b09c0e38099d08b17e4c5d56fb7da801fbf5e --- workbooks/access.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/workbooks/access.yaml b/workbooks/access.yaml index 390c87b54..67a940240 100644 --- a/workbooks/access.yaml +++ b/workbooks/access.yaml @@ -31,10 +31,21 @@ workflows: tasks: get_pubkey: action: tripleo.validations.get_pubkey - on-success: get_blacklisted_ip_addresses + on-success: + - stack_exists: <% $.ssh_private_key != null %> + - get_blacklisted_ip_addresses: <% $.ssh_private_key = null %> publish: pubkey: <% task().result %> + stack_exists: + action: heat.stacks_get + input: + stack_id: <% $.plan_name %> + on-success: get_blacklisted_ip_addresses + on-error: create_admin_via_ssh + publish-on-error: + ssh_servers_not_blacklisted: <% $.ssh_servers %> + get_blacklisted_ip_addresses: action: heat.stacks_output_show input: