From 187445416311962adc0d369070f8b33c7d475e38 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 17 Apr 2019 12:43:56 +1000 Subject: [PATCH] DCD-224: Use provided Ansible virtualenv if provided. --- bin/ansible-with-atl-env | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/ansible-with-atl-env b/bin/ansible-with-atl-env index 0da9640..3833140 100755 --- a/bin/ansible-with-atl-env +++ b/bin/ansible-with-atl-env @@ -13,4 +13,9 @@ set -a source $ENV_FILE set +a +# Use Ansible from virtualenv if provided +if [[ -f .venv/bin/ansible ]]; then + source .venv/bin/activate +fi + ansible-playbook -v -i $INV $PLAYBOOK | tee --append $LOG_FILE