From e86257683a599470f362801a14033739a23a10f1 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 29 Jan 2019 15:04:16 +0000 Subject: [PATCH] Remove ANSIBLE_ROLE_FETCH_MODE 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. Change-Id: Icf804e40bb4903e45e4357de8c775606087bb5c4 (cherry picked from commit 72a87f6740366ecbd8b82354e7f4cdeef81ac345) --- doc/source/user/aio/quickstart.rst | 8 -------- ...ate-ansible-role-fetch-mode-281d9fcb7389e163.yaml | 9 +++++++++ scripts/bootstrap-ansible.sh | 12 ------------ scripts/gate-check-commit.sh | 4 ---- 4 files changed, 9 insertions(+), 24 deletions(-) create mode 100644 releasenotes/notes/deprecate-ansible-role-fetch-mode-281d9fcb7389e163.yaml diff --git a/doc/source/user/aio/quickstart.rst b/doc/source/user/aio/quickstart.rst index f51cdf7ac7..b736fdae61 100644 --- a/doc/source/user/aio/quickstart.rst +++ b/doc/source/user/aio/quickstart.rst @@ -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 diff --git a/releasenotes/notes/deprecate-ansible-role-fetch-mode-281d9fcb7389e163.yaml b/releasenotes/notes/deprecate-ansible-role-fetch-mode-281d9fcb7389e163.yaml new file mode 100644 index 0000000000..7742946d26 --- /dev/null +++ b/releasenotes/notes/deprecate-ansible-role-fetch-mode-281d9fcb7389e163.yaml @@ -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. diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index bc97373d30..ec206890f7 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -34,9 +34,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 @@ -189,11 +186,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. @@ -223,10 +215,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 diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 62dc444946..f69ace1f7d 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -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"