[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
This commit is contained in:
parent
779f21cfac
commit
23e7980581
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user