enable-ssh-admin: allow to override plan name
By default, the overcloud plan name is "overcloud" but it can be renamed
if the stack is named directly. Allowing the operator to override it so
they can run that script on a deployment where the stack is named
differently than the default.
Change-Id: I05029d30447592d4e16d85acc490cda69b101e9c
Closes-Bug: #1896505
(cherry picked from commit bb2351a48d
)
This commit is contained in:
parent
1e0930620c
commit
ef3a39c27f
@ -3,6 +3,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# whitespace (space or newline) separated list
|
# whitespace (space or newline) separated list
|
||||||
|
OVERCLOUD_PLAN=${OVERCLOUD_PLAN:-"overcloud"}
|
||||||
OVERCLOUD_HOSTS=${OVERCLOUD_HOSTS:-""}
|
OVERCLOUD_HOSTS=${OVERCLOUD_HOSTS:-""}
|
||||||
OVERCLOUD_SSH_USER=${OVERCLOUD_SSH_USER:-"$USER"}
|
OVERCLOUD_SSH_USER=${OVERCLOUD_SSH_USER:-"$USER"}
|
||||||
# this is just for compatibility with CI
|
# this is just for compatibility with CI
|
||||||
@ -86,7 +87,7 @@ for HOST in $OVERCLOUD_HOSTS; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "Starting ssh admin enablement workflow"
|
echo "Starting ssh admin enablement workflow"
|
||||||
EXECUTION_PARAMS="{\"ssh_user\": \"$OVERCLOUD_SSH_USER\", \"ssh_servers\": $(overcloud_ssh_hosts_json), \"ssh_private_key\": $(overcloud_ssh_key_json "$SHORT_TERM_KEY_PRIVATE")}"
|
EXECUTION_PARAMS="{\"plan_name\": \"$OVERCLOUD_PLAN\", \"ssh_user\": \"$OVERCLOUD_SSH_USER\", \"ssh_servers\": $(overcloud_ssh_hosts_json), \"ssh_private_key\": $(overcloud_ssh_key_json "$SHORT_TERM_KEY_PRIVATE")}"
|
||||||
EXECUTION_CREATE_OUTPUT=$(openstack workflow execution create -f shell -d 'deployed server ssh admin creation' tripleo.access.v1.enable_ssh_admin "$EXECUTION_PARAMS")
|
EXECUTION_CREATE_OUTPUT=$(openstack workflow execution create -f shell -d 'deployed server ssh admin creation' tripleo.access.v1.enable_ssh_admin "$EXECUTION_PARAMS")
|
||||||
echo "$EXECUTION_CREATE_OUTPUT"
|
echo "$EXECUTION_CREATE_OUTPUT"
|
||||||
EXECUTION_ID=$(echo "$EXECUTION_CREATE_OUTPUT" | grep '^id=' | awk '-F"' '{ print $2 }')
|
EXECUTION_ID=$(echo "$EXECUTION_CREATE_OUTPUT" | grep '^id=' | awk '-F"' '{ print $2 }')
|
||||||
|
Loading…
Reference in New Issue
Block a user