Merge "making ansible version configurable"

This commit is contained in:
Jenkins 2016-06-07 21:25:49 +00:00 committed by Gerrit Code Review
commit 3053ef4b82
2 changed files with 9 additions and 1 deletions

View File

@ -4,3 +4,9 @@ Configuration
-------------
At Present there is no configuration for this element.
Ansible Version
---------------
By default this installs ansible 1.8.1, but the environment variable
ANSIBLE_VERSION can be set to override the installed version of Ansible.

View File

@ -19,6 +19,8 @@
set -eux
set -o pipefail
ANSIBLE_VERSION=${ANSIBLE_VERSION:-1.8.1}
install-packages build-essential libssl-dev libyaml-dev python-dev libxml2-dev libxslt-dev libffi-dev
virtualenv $ANSIBLE_VENV_DIR
@ -29,7 +31,7 @@ set -u
$ANSIBLE_VENV_DIR/bin/pip install paramiko PyYAML jinja2 httplib2
$ANSIBLE_VENV_DIR/bin/pip install ansible==1.8.1
$ANSIBLE_VENV_DIR/bin/pip install ansible==${ANSIBLE_VERSION}
ln -s $ANSIBLE_VENV_DIR/bin/ansible /usr/local/bin/ansible
ln -s $ANSIBLE_VENV_DIR/bin/ansible-playbook /usr/local/bin/ansible-playbook