Merge "Remove ANSIBLE_ROLE_FETCH_MODE" into stable/rocky

This commit is contained in:
Zuul 2019-03-22 22:14:46 +00:00 committed by Gerrit Code Review
commit 89c613ed0b
4 changed files with 9 additions and 24 deletions

View File

@ -131,14 +131,6 @@ version.
The next step is to bootstrap Ansible and the Ansible roles for the The next step is to bootstrap Ansible and the Ansible roles for the
development environment. 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: Run the following to bootstrap Ansible and the required roles:
.. code-block:: shell-session .. 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

@ -34,9 +34,6 @@ export SETUP_ARA=${SETUP_ARA:-"false"}
# This can be used to tell it which index to use, etc. # This can be used to tell it which index to use, etc.
export PIP_OPTS=${PIP_OPTS:-""} 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}" export OSA_WRAPPER_BIN="${OSA_WRAPPER_BIN:-scripts/openstack-ansible.sh}"
# This script should be executed from the root directory of the cloned repo # This script should be executed from the root directory of the cloned repo
@ -194,11 +191,6 @@ echo "openstack-ansible wrapper created."
# Update dependent roles # Update dependent roles
if [ -f "${ANSIBLE_ROLE_FILE}" ]; then 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 # NOTE(cloudnull): When bootstrapping we don't want ansible to interact
# with our plugins by default. This change will force # with our plugins by default. This change will force
# ansible to ignore our plugins during this process. # ansible to ignore our plugins during this process.
@ -228,10 +220,6 @@ if [ -f "${ANSIBLE_ROLE_FILE}" ]; then
unset ANSIBLE_VARS_PLUGINS unset ANSIBLE_VARS_PLUGINS
unset ANSIBLE_STRATEGY_PLUGINS unset ANSIBLE_STRATEGY_PLUGINS
unset ANSIBLE_CONFIG 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 fi
# Install and export the ARA callback plugin # Install and export the ARA callback plugin

View File

@ -36,10 +36,6 @@ export TERM=linux
# Store the clone repo root location # Store the clone repo root location
export OSA_CLONE_DIR="$(readlink -f $(dirname ${0})/..)" 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 # The directory in which the ansible logs will be placed
export ANSIBLE_LOG_DIR="/openstack/log/ansible-logging" export ANSIBLE_LOG_DIR="/openstack/log/ansible-logging"