undercloud/stackrc: unset OS_* variables

If we redeploy the undercloud, we want to unset the OS_* variables
before exporting the new ones to avoid any conflict.

Co-Authored-By: Sergii Golovatiuk <sgolovat@redhat.com>
Change-Id: If4fa8533cc1fff33eb27c381ca3ddca96c2d03ca
This commit is contained in:
Emilien Macchi 2018-09-13 08:44:43 -06:00
parent dec447e92f
commit 247a59d8d6

View File

@ -12,6 +12,9 @@ touch $HOMEDIR/stackrc
chmod 0600 $HOMEDIR/stackrc
cat > $HOMEDIR/stackrc <<-EOF_CAT
# Clear any old environment that may conflict.
for key in \$( set | awk -F= '/^OS_/ {print \$1}' ); do unset "\${key}" ; done
export OS_AUTH_TYPE=password
export OS_PASSWORD=$admin_password
export OS_AUTH_URL=$auth_url