Merge "switch back to python2"

This commit is contained in:
Jenkins 2017-07-28 17:03:52 +00:00 committed by Gerrit Code Review
commit f54474e092
1 changed files with 4 additions and 2 deletions

View File

@ -273,8 +273,10 @@ if ! admin_node_command type ansible 2>&1 > /dev/null; then
if [[ "$ANSIBLE_INSTALL_SOURCE" == "apt" ]]; then if [[ "$ANSIBLE_INSTALL_SOURCE" == "apt" ]]; then
with_retries admin_node_command -- sudo apt-get install -y ansible python-netaddr with_retries admin_node_command -- sudo apt-get install -y ansible python-netaddr
elif [[ "$ANSIBLE_INSTALL_SOURCE" == "pip" ]]; then elif [[ "$ANSIBLE_INSTALL_SOURCE" == "pip" ]]; then
with_retries admin_node_command -- sudo apt-get install -y python3-netaddr libssl-dev python3-pip admin_node_command -- sudo pip uninstall -y setuptools pip || true
with_retries admin_node_command -- sudo pip3 install --upgrade ansible==$required_ansible_version with_retries admin_node_command -- sudo apt-get install -y --reinstall python-netaddr libssl-dev python-pip python-setuptools python-pkg-resources
with_retries admin_node_command -- sudo -H easy_install pyopenssl==16.2.0
with_retries admin_node_command -- sudo pip install --upgrade ansible==$required_ansible_version
else else
echo "ERROR: Unknown Ansible install source: ${ANSIBLE_INSTALL_SOURCE}" echo "ERROR: Unknown Ansible install source: ${ANSIBLE_INSTALL_SOURCE}"
exit 1 exit 1