Perform upgrade by default when installing ansible
We don't upgrade ansible in the upgrade jobs because the requirement is already satisfied according to pip. Although, we should upgrade ansible as it may differ between releases. Also perform a clean install if ansible is already present to avoid conflicts. Change-Id: I3cb1059408ef069001cde91474c68768315ff784
This commit is contained in:
parent
43062e2fe7
commit
645ac1ca5f
|
@ -21,8 +21,12 @@ BIFROST_COLLECTIONS_PATHS=${ANSIBLE_COLLECTIONS_PATHS:-}
|
|||
PLAYBOOKS_LIBRARY_PATH=$(dirname $0)/../playbooks/library
|
||||
|
||||
echo "Installing/upgrading Ansible"
|
||||
${PIP} install "${ANSIBLE_SOURCE_PATH}"
|
||||
ANSIBLE=${VENV}/bin/ansible
|
||||
if [ -f "$ANSIBLE" ]; then
|
||||
${PIP} uninstall -y ansible
|
||||
fi
|
||||
${PIP} install "${ANSIBLE_SOURCE_PATH}"
|
||||
|
||||
ANSIBLE_GALAXY=${VENV}/bin/ansible-galaxy
|
||||
if [[ -z $BIFROST_COLLECTIONS_PATHS ]]; then
|
||||
echo "Setting ANSIBLE_COLLECTIONS_PATHS to virtualenv"
|
||||
|
|
Loading…
Reference in New Issue