Parameterize ansible version in embedded runtime
Change-Id: Ie880e10d4915c06d86084b60cbb8d994d5d9965d
This commit is contained in:
parent
05e235859d
commit
27aeb36389
@ -20,6 +20,6 @@ Usage
|
||||
|
||||
|
||||
With the script sourced, the ansible enviornment will create a virtual environment at
|
||||
`${HOME}/ansible25` if it does not already exist.
|
||||
`${HOME}/ansible${ANSIBLE_VERSION}` if it does not already exist.
|
||||
|
||||
To leave the embedded ansible enviornment run the function `deactivate`.
|
||||
|
@ -14,7 +14,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
export OPTS=()
|
||||
export ANSIBLE_EMBED_HOME="${HOME}/ansible25"
|
||||
export ANSIBLE_VERSION="${ANSIBLE_VERSION:-2.5.5.0}"
|
||||
export ANSIBLE_EMBED_HOME="${HOME}/ansible${ANSIBLE_VERSION}"
|
||||
OPTS+=('ANSIBLE_EMBED_HOME')
|
||||
|
||||
source /etc/os-release
|
||||
@ -39,7 +40,7 @@ if [[ ! -e "${ANSIBLE_EMBED_HOME}/bin/ansible" ]]; then
|
||||
virtualenv "${ANSIBLE_EMBED_HOME}"
|
||||
fi
|
||||
eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade --force pip"
|
||||
eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade ansible==2.5.5.0 --isolated"
|
||||
eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade ansible==${ANSIBLE_VERSION} --isolated"
|
||||
eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade jmespath --isolated"
|
||||
eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade hvac --isolated"
|
||||
eval "${ANSIBLE_EMBED_HOME}/bin/pip install --upgrade netaddr --isolated"
|
||||
|
Loading…
x
Reference in New Issue
Block a user