2017-09-27 22:30:54 +00:00
|
|
|
#!/bin/sh
|
2018-06-21 12:56:30 +00:00
|
|
|
## Script is specifically for use on travis-ci
|
2017-09-27 22:30:54 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
## This is an example setup script that you would encapsulate the installation
|
|
|
|
# What version of avm setup to use
|
|
|
|
echo "Setting up Ansible Version Manager"
|
|
|
|
AVM_VERSION="v1.0.0"
|
2018-04-16 16:52:19 +00:00
|
|
|
## Install Ansible 2.5.X using pip and label it 'v2.5'
|
2019-01-11 15:14:22 +00:00
|
|
|
export ANSIBLE_VERSIONS_0="2.5.0.0"
|
|
|
|
export INSTALL_TYPE_0="pip"
|
|
|
|
export ANSIBLE_LABEL_0="v2.5"
|
2017-09-27 22:30:54 +00:00
|
|
|
# Whats the default version
|
2018-04-16 16:52:19 +00:00
|
|
|
export ANSIBLE_DEFAULT_VERSION="v2.5"
|
2017-09-27 22:30:54 +00:00
|
|
|
|
|
|
|
## Create a temp dir to download avm
|
|
|
|
avm_dir="$(mktemp -d 2> /dev/null || mktemp -d -t 'mytmpdir')"
|
|
|
|
git clone https://github.com/ahelal/avm.git "${avm_dir}" > /dev/null 2>&1
|
|
|
|
|
|
|
|
## Run the setup
|
|
|
|
/bin/sh ${avm_dir}/setup.sh
|
|
|
|
|
|
|
|
exit 0
|