From f4e66eb465315881c3934de8e82396bc3d048700 Mon Sep 17 00:00:00 2001
From: Markos Chandras <mchandras@suse.de>
Date: Thu, 8 Mar 2018 16:55:52 +0000
Subject: xci: config: evn-vars: Dynamically determine the Ansible version

There is no good reason why we should pin the Ansible version without
the ability to override it. OpenStack Ansible is doing a great work
testing Ansible releases as early as possible so we could benefit from
that work and use whatever Ansible our pinned OSA uses.

Change-Id: I4677dbefc68f7140417ece34d013ca9674baab43
Signed-off-by: Markos Chandras <mchandras@suse.de>
---
 xci/config/env-vars | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xci/config/env-vars b/xci/config/env-vars
index 04c10c0e..f0181118 100755
--- a/xci/config/env-vars
+++ b/xci/config/env-vars
@@ -36,7 +36,7 @@ export LOG_PATH=${LOG_PATH:-${XCI_PATH}/xci/logs}
 # This currently matches to OSA Ansible version but it doesn't really
 # matter since bifrost and OSA will use the Ansible version they need.
 # Overall, it's better to use what OSA supports so we can use new features.
-export XCI_ANSIBLE_PIP_VERSION=2.3.2.0
+export XCI_ANSIBLE_PIP_VERSION=${XCI_ANSIBLE_PIP_VERSION:-$(curl -s https://raw.githubusercontent.com/openstack/openstack-ansible/${OPENSTACK_OSA_VERSION}/scripts/bootstrap-ansible.sh | grep ansible== | sed -n "s/.*ansible==\([0-9.]*\).*/\1/p")}
 export ANSIBLE_HOST_KEY_CHECKING=False
 # subject of the certificate
 export XCI_SSL_SUBJECT=${XCI_SSL_SUBJECT:-"/C=US/ST=California/L=San Francisco/O=IT/CN=xci.releng.opnfv.org"}
-- 
cgit