Merge "Allow to define user.rc file for OSA"

This commit is contained in:
Zuul 2022-12-01 21:34:49 +00:00 committed by Gerrit Code Review
commit 38b52010bc
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,7 @@
---
features:
- |
Added possibility to source environment variables from a user file that
will have prescedence over all environemnt variables loaded after
openstack-ansible.rc and have prescedence over all variables defined there
By default path to the user file is ``/etc/openstack_deploy/user.rc``.

View File

@ -55,6 +55,12 @@ if [[ "${PWD}" == *"${OSA_CLONE_ROOT}"* ]] || [ "${RUN_CMD}" == "openstack-ansib
fi
fi
OSA_USER_RC="${OSA_USER_RC:-${OSA_CONFIG_DIR}/user.rc}"
if [[ -f ${OSA_USER_RC} ]]; then
source ${OSA_USER_RC}
fi
# Check whether there are any user configuration files
if ls -1 ${OSA_CONFIG_DIR}/user_*.yml &> /dev/null; then