Fix ansible linters

The ANSIBLE_COLLECTIONS_PATHS has been deprecated in 2.19 and
changed to ANSIBLE_COLLECTIONS_PATH

Change-Id: I6491a6807b822be780ba9265863548774cfbe70b
This commit is contained in:
Riccardo Pittau 2025-01-31 15:15:38 +01:00
parent 602b305912
commit bf14155b8f
3 changed files with 10 additions and 10 deletions

View File

@ -122,15 +122,15 @@ In order to really get started, you must install dependencies.
With the addition of ansible collections, the ``env-setup.sh`` will install
the collections in the default ansible ``collections_paths`` (according to your
ansible.cfg) or you can specify the location setting
``ANSIBLE_COLLECTIONS_PATHS``:
``ANSIBLE_COLLECTIONS_PATH``:
.. code-block:: bash
$ export ANSIBLE_COLLECTIONS_PATHS=/mydir/collections
$ export ANSIBLE_COLLECTIONS_PATH=/mydir/collections
.. note::
If you are using a virtual environment ANSIBLE_COLLECTIONS_PATHS is
If you are using a virtual environment ANSIBLE_COLLECTIONS_PATH is
automatically set. After Ansible Collections are installed,
a symbolic link to to the installation is created in the bifrost playbook
directory.

View File

@ -19,7 +19,7 @@ fi
ANSIBLE_PIP_VERSION=${ANSIBLE_PIP_VERSION:-${DEFAULT_PIP_ANSIBLE}}
ANSIBLE_SOURCE_PATH=${ANSIBLE_SOURCE_PATH:-ansible${ANSIBLE_PIP_VERSION}}
BIFROST_COLLECTIONS_PATHS=${ANSIBLE_COLLECTIONS_PATHS:-}
BIFROST_COLLECTIONS_PATHS=${ANSIBLE_COLLECTIONS_PATH:-}
PLAYBOOKS_LIBRARY_PATH=$(dirname $0)/../playbooks/library
echo "Installing/upgrading Ansible"
@ -33,9 +33,9 @@ ${PIP} install "${ANSIBLE_SOURCE_PATH}"
ANSIBLE_GALAXY="${SUDO} ${VENV}/bin/ansible-galaxy"
if [[ -z $BIFROST_COLLECTIONS_PATHS ]]; then
echo "Setting ANSIBLE_COLLECTIONS_PATHS to virtualenv"
export ANSIBLE_COLLECTIONS_PATHS=${VENV}/collections
BIFROST_COLLECTIONS_PATHS=$ANSIBLE_COLLECTIONS_PATHS
echo "Setting ANSIBLE_COLLECTIONS_PATH to virtualenv"
export ANSIBLE_COLLECTIONS_PATH=${VENV}/collections
BIFROST_COLLECTIONS_PATHS=$ANSIBLE_COLLECTIONS_PATH
fi
if [[ -n "$ANSIBLE_COLLECTION_SOURCE_PATH" ]]; then
${SUDO} mkdir -p "$BIFROST_COLLECTIONS_PATHS/ansible_collections/openstack"
@ -51,10 +51,10 @@ else
fi
# Symlink Collections to the playbook directory. This removes the need of setting
# ANSIBLE_COLLECTIONS_PATHS environment variable
# ANSIBLE_COLLECTIONS_PATH environment variable
if [ ! -e "$(dirname $0)/../playbooks/collections" ]; then
echo "Creating a symbolic link to ansible collections in bifrost playbook directory"
ln -s ${ANSIBLE_COLLECTIONS_PATHS} "$(dirname $0)/../playbooks/collections"
ln -s ${ANSIBLE_COLLECTIONS_PATH} "$(dirname $0)/../playbooks/collections"
fi
if [[ "${BIFROST_HIDE_PROMPT:-false}" != true ]]; then

View File

@ -16,7 +16,7 @@ rm -f "$DEST/ansible_collections/openstack/cloud"
ln -s "$(realpath $SOURCE)" "$DEST/ansible_collections/openstack/cloud"
export ANSIBLE_COLLECTIONS_PATHS="$(realpath $DEST)"
export ANSIBLE_COLLECTIONS_PATH="$(realpath $DEST)"
export ANSIBLE_LIBRARY="$(dirname $0)/../playbooks/library"
export ANSIBLE_ROLES_PATH="$(dirname $0)/../playbooks/roles"