Merge "Remove ANSIBLE_ROLE_FETCH_MODE"

This commit is contained in:
Zuul 2019-02-13 13:40:46 +00:00 committed by Gerrit Code Review
commit 392333c42b
4 changed files with 9 additions and 24 deletions

View File

@ -124,14 +124,6 @@ version.
The next step is to bootstrap Ansible and the Ansible roles for the
development environment.
You may wish to change the role fetch mode. Options are ``galaxy`` and
``git-clone``. The default for this option is ``git-clone``. The mode may
be changed by setting the ``ANSIBLE_ROLE_FETCH_MODE`` environment variable.
options:
:galaxy: Resolve all role dependencies using the ``ansible-galaxy`` resolver
:git-clone: Clone all of the role dependencies using native git
Run the following to bootstrap Ansible and the required roles:
.. code-block:: shell-session

View File

@ -0,0 +1,9 @@
---
deprecations:
- |
There was previously an environment variable (``ANSIBLE_ROLE_FETCH_MODE``)
to set whether the roles in ansible-role-requirements.yml were fetched using
ansible-galaxy or using git, however the default has been git for some time
ansible since the use of the ``ceph-ansible`` respoitory for ceph deployment,
using ansible-galaxy to download the roles does not work properly. This
functionality has therefore been removed.

View File

@ -33,9 +33,6 @@ export SETUP_ARA=${SETUP_ARA:-"false"}
# This can be used to tell it which index to use, etc.
export PIP_OPTS=${PIP_OPTS:-""}
# Set the role fetch mode to any option [galaxy, git-clone]
export ANSIBLE_ROLE_FETCH_MODE=${ANSIBLE_ROLE_FETCH_MODE:-git-clone}
export OSA_WRAPPER_BIN="${OSA_WRAPPER_BIN:-scripts/openstack-ansible.sh}"
# This script should be executed from the root directory of the cloned repo
@ -193,11 +190,6 @@ echo "openstack-ansible wrapper created."
# Update dependent roles
if [ -f "${ANSIBLE_ROLE_FILE}" ]; then
if [[ "${ANSIBLE_ROLE_FETCH_MODE}" == 'galaxy' ]];then
# Pull all required roles.
ansible-galaxy install --role-file="${ANSIBLE_ROLE_FILE}" \
--force
elif [[ "${ANSIBLE_ROLE_FETCH_MODE}" == 'git-clone' ]];then
# NOTE(cloudnull): When bootstrapping we don't want ansible to interact
# with our plugins by default. This change will force
# ansible to ignore our plugins during this process.
@ -227,10 +219,6 @@ if [ -f "${ANSIBLE_ROLE_FILE}" ]; then
unset ANSIBLE_VARS_PLUGINS
unset ANSIBLE_STRATEGY_PLUGINS
unset ANSIBLE_CONFIG
else
echo "Please set the ANSIBLE_ROLE_FETCH_MODE to either of the following options ['galaxy', 'git-clone']"
exit 99
fi
fi
# Install and export the ARA callback plugin

View File

@ -36,10 +36,6 @@ export TERM=linux
# Store the clone repo root location
export OSA_CLONE_DIR="$(readlink -f $(dirname ${0})/..)"
# Set the role fetch mode to git-clone to avoid interactions
# with the Ansible galaxy API.
export ANSIBLE_ROLE_FETCH_MODE="git-clone"
# The directory in which the ansible logs will be placed
export ANSIBLE_LOG_DIR="/openstack/log/ansible-logging"