Ensure python2 is used in the ansible venv
This ensures all the commands are running with a python2 environment, until we are ready for python3. Change-Id: I5f51e76a23015a08d4e05a4e9082e227a3e62743
This commit is contained in:
parent
d0153ce147
commit
b939b03879
@ -109,8 +109,9 @@ elif [ -n "$HTTP_PROXY" ]; then
|
||||
PIP_OPTS+="--proxy $HTTP_PROXY"
|
||||
fi
|
||||
|
||||
# Figure out the version of python is being used
|
||||
PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python3 || which python2 || which python)}"
|
||||
# Force using python2. When python3 and python2 dual stack is supported uncomment the following:
|
||||
#PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python3 || which python2 || which python)}"
|
||||
PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python2 || which python)}"
|
||||
PYTHON_VERSION="$($PYTHON_EXEC_PATH -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')"
|
||||
|
||||
# Use https when Python with native SNI support is available
|
||||
|
Loading…
Reference in New Issue
Block a user