Define OSA clone dir in the openstack-ansible.sh script

When the openstack-ansible.sh was extracted from bootstrap.sh,
the resolving from the OSA_CLONE_DIR was broken.

Due to this, the OSA_CLONE_DIR value is empty, and the comparison
in the openstack-ansible is always true, which is not what we
want for external use.

Change-Id: I6a05d3b73838fa646a635831d655f7470df3378f
This commit is contained in:
Jean-Philippe Evrard 2019-01-29 16:12:27 +01:00
parent d4821d39d9
commit ecdd3822b6
2 changed files with 2 additions and 1 deletions

View File

@ -176,6 +176,7 @@ sed -i "s|OSA_PLAYBOOK_PATH|${OSA_PLAYBOOK_PATH}|g" /usr/local/bin/openstack-ans
# Create openstack ansible wrapper tool
cp -v ${OSA_WRAPPER_BIN} /usr/local/bin/openstack-ansible
sed -i "s|OSA_CLONE_DIR|${OSA_CLONE_DIR}|g" /usr/local/bin/openstack-ansible
# Ensure wrapper tool is executable
chmod +x /usr/local/bin/openstack-ansible

View File

@ -31,7 +31,7 @@ function info {
RUN_CMD=$(basename ${0})
# Apply the OpenStack-Ansible configuration selectively.
if [[ "${PWD}" == *"${OSA_CLONE_DIR}"* ]] || [ "${RUN_CMD}" == "openstack-ansible" ]; then
if [[ "${PWD}" == *"OSA_CLONE_DIR"* ]] || [ "${RUN_CMD}" == "openstack-ansible" ]; then
# Source the Ansible configuration.
. /usr/local/bin/openstack-ansible.rc