xci: xci-deploy.sh: Make sure all local Ansible installations are gone 75/42975/11
authorMarkos Chandras <mchandras@suse.de>
Fri, 22 Sep 2017 17:37:58 +0000 (18:37 +0100)
committerMarkos Chandras <mchandras@suse.de>
Wed, 27 Sep 2017 22:11:34 +0000 (23:11 +0100)
We need to ensure that all Ansible installations are gone before we
install it again so we can ensure that a local or system wide
installation will not take precedence over the one we try to install.

Change-Id: I9daf66d661697baf63340ba4af1cd58fbd81f143
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/xci-deploy.sh

index 9585610..0ee5262 100755 (executable)
@@ -143,8 +143,15 @@ echo
 
 echo "Info: Configuring localhost for openstack-ansible"
 echo "-----------------------------------------------------------------------"
-# NOTE(hwoarang) we need newer ansible to work on the OSA playbooks
+# NOTE(hwoarang) we need newer ansible to work on the OSA playbooks. Make sure
+# all installations are gone. This is ugly and has to be removed as soon as we
+# are able to deploy bifrost in vent or when bifrost start working with newest
+# ansible
+pip uninstall -y ansible || true
+sudo -H pip uninstall -y ansible || true
 sudo pip install --force-reinstall ansible==${XCI_ANSIBLE_PIP_VERSION}
+# Start fresh
+hash -r
 cd $XCI_PATH/playbooks
 ansible-playbook -i inventory configure-localhost.yml
 echo "-----------------------------------------------------------------------"