Fix check for install venv and ansible pip
This commit is contained in:
parent
b9227f3354
commit
456208856d
|
@ -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…
Reference in New Issue