packer/scripts/ansible_install_pip
Victor LABORIE e08ceb0ffa Use PyPI for Ansible install
* Permit ansible version update on vagrant provisioning
  * Change ansible versionning in vars/*.json
2018-09-05 17:57:21 +02:00

14 lines
318 B
Bash
Executable file

#!/bin/sh
set -eu
ANSIBLE_VERSION="${ANSIBLE_VERSION:-2.2.1.0}"
DEBIAN_FRONTEND=noninteractive apt-get -yq install build-essential python-dev python-virtualenv git
[ ! -f "/tmp/venv/bin/activate" ] && virtualenv /tmp/venv
. /tmp/venv/bin/activate && trap "deactivate" 0
pip install "ansible==${ANSIBLE_VERSION}"