Browse Source

Fix check for install venv and ansible pip

pull/1/head
Victor LABORIE 3 years ago
parent
commit
456208856d
  1. 9
      scripts/ansible_install_pip

9
scripts/ansible_install_pip

@ -6,7 +6,8 @@ ANSIBLE_VERSION="${ANSIBLE_VERSION:-stable-2.2}"
DEBIAN_FRONTEND=noninteractive apt-get -yq install build-essential python-dev python-virtualenv git
if [ ! -d venv ]; then
virtualenv /tmp/venv
. /tmp/venv/bin/activate && pip install "git+https://github.com/ansible/ansible.git@${ANSIBLE_VERSION}"; deactivate
fi
[ ! -f "/tmp/venv/bin/activate" ] && virtualenv /tmp/venv
[ ! -x "/tmp/venv/bin/ansible" ] && . /tmp/venv/bin/activate && pip install "git+https://github.com/ansible/ansible.git@${ANSIBLE_VERSION}"
exit 0
Loading…
Cancel
Save