Skip to content

Commit 8cb9b2c

Browse files
committed
pass proper OS_AUTH_URL from ansible deployer
Change-Id: I29cb0748fb81988d32f3a373d388dcee68d2b920
1 parent 5105a79 commit 8cb9b2c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ansible/run.sh

+8
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export DOMAINSUFFIX=${DOMAINSUFFIX-$(hostname -d)}
4747
# deployment related environment set by any stage and put to tf_stack_profile at the end
4848
declare -A DEPLOYMENT_ENV=( \
4949
['AUTH_PASSWORD']="$AUTH_PASSWORD" \
50+
['AUTH_URL']=''\
5051
)
5152

5253
function build() {
@@ -200,6 +201,13 @@ function collect_deployment_env() {
200201
sudo chmod -R a+r $openstack_deployer_dir/etc/kolla/ || /bin/true
201202
cp $openstack_deployer_dir/etc/kolla/* $TF_CONFIG_DIR/ || /bin/true
202203
DEPLOYMENT_ENV['OPENSTACK_CONTROLLER_NODES']="$(echo $CONTROLLER_NODES | cut -d ' ' -f 1)"
204+
205+
local auth_ip=$(echo "$CONTROLLER_NODES" | tr ' ' ',' | cut -d ',' -f 1)
206+
local proto="http"
207+
if [[ "${SSL_ENABLE,,}" == 'true' ]] ; then
208+
proto="https"
209+
fi
210+
DEPLOYMENT_ENV['OS_AUTH_URL']="$proto://$auth_ip:5000/v3"
203211
fi
204212

205213
if ! is_after_stage 'wait' ; then

0 commit comments

Comments
 (0)