diff --git a/releasenotes/notes/osa-wrapper-path-fix-91e8c56b72c968b0.yaml b/releasenotes/notes/osa-wrapper-path-fix-91e8c56b72c968b0.yaml new file mode 100644 index 0000000000..d02528e0ef --- /dev/null +++ b/releasenotes/notes/osa-wrapper-path-fix-91e8c56b72c968b0.yaml @@ -0,0 +1,12 @@ +--- +fixes: + - | + In https://review.openstack.org/582633 an adjustment was made to the + ``openstack-ansible`` wrapper which mistakenly changed the intended + behaviour. The wrapper is only meant to include the extra-vars and + invoke the inventory if ``ansible-playbook`` was executed from inside + the ``openstack-ansible`` repository clone (typically + ``/opt/openstack-ansible``), but the change made the path irrelevant. + This has now been fixed - ``ansible-playbook`` and ``ansible`` will + only invoke the inventory and include extra vars if it is invoked + from inside the git clone path. diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index 44397f8283..bc97373d30 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -177,6 +177,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 diff --git a/scripts/openstack-ansible.sh b/scripts/openstack-ansible.sh index 677fe4d806..dd3d823a71 100644 --- a/scripts/openstack-ansible.sh +++ b/scripts/openstack-ansible.sh @@ -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