Fix override of ANSIBLE_PACKAGE variable
The initialisation of the ANSIBLE_PACKAGE variable in bootstrap-ansible should be overridden by any existing environment variable of the same name, however it is incorrectly looking for "ANSIBLE_RELEASE." This means that any attempt to override the Ansible version will be ignored. This patch fixes it so that the script looks for a variable of the same name, "ANSIBLE_PACKAGE," and also updates the documentation. Related to commit: 88ae508e0f95 "Install Ansible from pypi instead of from a git clone." Change-Id: I5cf40ea855f05073fbe568cd9839dbd5134e19bf
This commit is contained in:
parent
dcfdc9321e
commit
a4c836c1b2
@ -23,7 +23,20 @@ The ``bootstrap-ansible.sh`` script installs Ansible including `core`_ and
|
||||
While there are several configurable environment variables which this script
|
||||
uses, the following are commonly used:
|
||||
|
||||
* ``ANSIBLE_GIT_RELEASE`` - The version of Ansible to install.
|
||||
* ``ANSIBLE_PACKAGE`` - The version of Ansible to install.
|
||||
|
||||
For example:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ export ANSIBLE_PACKAGE="ansible==2.1.0"
|
||||
|
||||
Installing directly from git is also supported. For example, from the tip of
|
||||
Ansible development branch:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ export ANSIBLE_PACKAGE="git+https://github.com/ansible/ansible@devel#egg=ansible"
|
||||
|
||||
* ``ANSIBLE_ROLE_FILE`` - The location of a yaml file which ansible-galaxy can
|
||||
consume which specifies which roles to download and install. The default
|
||||
|
@ -22,7 +22,7 @@ set -e -u -x
|
||||
## Vars ----------------------------------------------------------------------
|
||||
export HTTP_PROXY=${HTTP_PROXY:-""}
|
||||
export HTTPS_PROXY=${HTTPS_PROXY:-""}
|
||||
export ANSIBLE_PACKAGE=${ANSIBLE_RELEASE:-"ansible==2.1.0.0"}
|
||||
export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible==2.1.0.0"}
|
||||
export ANSIBLE_ROLE_FILE=${ANSIBLE_ROLE_FILE:-"ansible-role-requirements.yml"}
|
||||
export SSH_DIR=${SSH_DIR:-"/root/.ssh"}
|
||||
export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:-"noninteractive"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user