From 0a1920059ddd3569f8e3aca3e9207754571dde9b Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Mon, 5 Nov 2018 12:23:45 -0600 Subject: [PATCH] Adds option to enable ARA plugin install Adds the option to enable ARA callback plugin install during bootstrap-ansible. Set to false by default in the bootstrap-ansible script and can be enabled with the SETUP_ARA variable. In the gate-check-commit, installation is set to enabled by default. Change-Id: I5eb4285100207a8b8808b5000261f70c89c69de2 (cherry picked from commit 8fbd1cbeaa9b35615163a5c7414f0abf0172d50c) --- scripts/bootstrap-ansible.sh | 7 +++++++ scripts/gate-check-commit.sh | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index f0d8b52d8a..4d5c1ca688 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -27,6 +27,8 @@ export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible==2.5.10"} export ANSIBLE_ROLE_FILE=${ANSIBLE_ROLE_FILE:-"ansible-role-requirements.yml"} export SSH_DIR=${SSH_DIR:-"/root/.ssh"} export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:-"noninteractive"} +# check whether to install the ARA callback plugin +export SETUP_ARA=${SETUP_ARA:-"false"} # Use pip opts to add options to the pip install command. # This can be used to tell it which index to use, etc. @@ -181,6 +183,11 @@ chmod +x /usr/local/bin/openstack-ansible echo "openstack-ansible wrapper created." +# Install and export the ARA callback plugin +if [ "${SETUP_ARA}" == "true" ]; then + setup_ara +fi + # If the Ansible plugins are in the old location remove them. [[ -d "/etc/ansible/plugins" ]] && rm -rf "/etc/ansible/plugins" diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 44db7f8749..62dc444946 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -58,6 +58,9 @@ export INSTALL_METHOD=${3:-"source"} # is created. The checkout must always be N-1. export UPGRADE_SOURCE_BRANCH=${UPGRADE_SOURCE_BRANCH:-'stable/queens'} +# enable the ARA callback plugin +export SETUP_ARA=true + ## Change branch for Upgrades ------------------------------------------------ # If the action is to upgrade, then store the current SHA, # checkout the source SHA before executing the greenfield @@ -102,9 +105,6 @@ fi # Bootstrap Ansible source "${OSA_CLONE_DIR}/scripts/bootstrap-ansible.sh" -# Install and export the ARA callback plugin -setup_ara - # Log some data about the instance and the rest of the system log_instance_info