2019-04-23 20:36:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
|
2022-05-02 18:34:31 +00:00
|
|
|
: ${ANSIBLE_MAJOR_VERSION:=2.12}
|
2021-11-11 00:11:50 +00:00
|
|
|
|
|
|
|
/usr/bin/python -m pip uninstall -y ansible ansible-base ansible-core
|
|
|
|
/usr/bin/python -m pip install -r tests/requirements-${ANSIBLE_MAJOR_VERSION}.txt
|
2019-04-23 20:36:03 +00:00
|
|
|
mkdir -p /.ssh
|
2020-04-01 14:23:29 +00:00
|
|
|
mkdir -p cluster-dump
|
2019-04-23 20:36:03 +00:00
|
|
|
mkdir -p $HOME/.ssh
|
|
|
|
ansible-playbook --version
|
2021-11-11 00:11:50 +00:00
|
|
|
|
|
|
|
# in some cases we may need to bring in collections or roles from ansible-galaxy
|
|
|
|
# to compensate for missing functionality in older ansible versions
|
|
|
|
if [ -f requirements-${ANSIBLE_MAJOR_VERSION}.yml ] ; then
|
|
|
|
ansible-galaxy role install -r requirements-${ANSIBLE_MAJOR_VERSION}.yml
|
|
|
|
ansible-galaxy collection install -r requirements-${ANSIBLE_MAJOR_VERSION}.yml
|
|
|
|
fi
|