Skip to content

Instantly share code, notes, and snippets.

@mrlesmithjr
Last active June 6, 2017 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrlesmithjr/8beb3ab7989e5ee3ef61082c9162b564 to your computer and use it in GitHub Desktop.
Save mrlesmithjr/8beb3ab7989e5ee3ef61082c9162b564 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -x
ANSIBLE_VERSIONS=("1.9.4" "1.9.5" "1.9.6" "2.0.0.0" "2.0.0.1" "2.0.0.2" \
"2.0.1.0" "2.0.2.0" "2.1.0.0" "2.1.1.0" "2.1.2.0" "2.1.3.0" \
"2.1.4.0" "2.1.5.0" "2.1.6.0" "2.2.0.0" "2.2.1.0" "2.2.2.0" \
"2.2.3.0" "2.3.0.0" "2.3.1.0")
ANSIBLE_CONTAINER_VERSIONS=("0.1.0" "0.2.0" "0.3.0" "0.9.0.0" "0.9.1")
VIRTUALENV_PATH="./python-virtualenvs"
pip install virtualenv
for ANSVER in "${ANSIBLE_VERSIONS[@]}"
do
if [ ! -d "$VIRTUALENV_PATH/ansible-$ANSVER" ]; then
virtualenv $VIRTUALENV_PATH/ansible-$ANSVER
source $VIRTUALENV_PATH/ansible-$ANSVER/bin/activate
pip install ansible==$ANSVER ansible-lint
deactivate
fi
done
for ANSCONTVER in "${ANSIBLE_CONTAINER_VERSIONS[@]}"
do
if [ ! -d "$VIRTUALENV_PATH/ansible-container-$ANSCONTVER" ]; then
virtualenv $VIRTUALENV_PATH/ansible-container-$ANSCONTVER
source $VIRTUALENV_PATH/ansible-container-$ANSCONTVER/bin/activate
pip install ansible-container[docker]==$ANSCONTVER ansible-lint
deactivate
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment