diff --git a/bin/ansible-with-atl-env b/bin/ansible-with-atl-env index 43712f5..14a9938 100755 --- a/bin/ansible-with-atl-env +++ b/bin/ansible-with-atl-env @@ -14,4 +14,5 @@ source $ENV_FILE set +a # Use Ansible from virtualenv if provided -pipenv run ansible-playbook -v -i $INV $PLAYBOOK 2>&1 | tee --append $LOG_FILE +pipenv run \ + ansible-playbook -v -i $INV $PLAYBOOK 2>&1 | tee --append $LOG_FILE diff --git a/bin/install-ansible b/bin/install-ansible index f29e024..15b53d4 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -4,12 +4,14 @@ set -e # The Amazon Linux 2 Ansible package is 2.4, which has issue # interacting with RDS, so use pipenv to install a known-good version. +# Another alternative here would be nix, however that has issues +# installing as root, and can be slow in practice. -# Luckily AmzLnx2 and Ubuntu use the same package name. This may need -# some logic if other distros are added. Note: Parsing /etc/os-release -# is probably a good starting point for that. +# Luckily AmazonLinux2 and Ubuntu use the same package name for +# pip. This may need some logic if other distros are added. Note: +# Parsing /etc/os-release is probably a good starting point for that. ./bin/pacapt install python-pip +# See Pipfile and Pipfile.lock. pip install pipenv - pipenv sync diff --git a/bin/run-all-tests b/bin/run-all-tests index 82b1c02..2cc903f 100755 --- a/bin/run-all-tests +++ b/bin/run-all-tests @@ -2,11 +2,12 @@ set -e -# Use Ansible from virtualenv if provided +# Install dev packages from Pipfile.loc if necessary. pipenv sync --dev for role in `find roles/ -name molecule | sort`; do pushd `dirname $role` - pipenv run molecule test --all + pipenv run \ + molecule test --all popd done