From 20ed39d9af3a03bc1b9cc5e2ed31c1ee4554325b Mon Sep 17 00:00:00 2001 From: Dylan Rathbone Date: Tue, 3 Nov 2020 12:36:48 +1000 Subject: [PATCH] hotfix: Update 'ansible_python_interpreter' specification --- ansible.cfg | 3 +-- bin/ansible-with-atl-env | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ansible.cfg b/ansible.cfg index 8e34f74..bbcc186 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,4 +1,3 @@ [defaults] retry_files_enabled = False -callback_whitelist = profile_tasks -ansible_python_interpreter="/usr/bin/env python3" +callback_whitelist = profile_tasks \ No newline at end of file diff --git a/bin/ansible-with-atl-env b/bin/ansible-with-atl-env index 1683c3a..4c0f681 100755 --- a/bin/ansible-with-atl-env +++ b/bin/ansible-with-atl-env @@ -11,6 +11,8 @@ ENV_FILE=${4:-"/etc/atl"} export PATH=/usr/local/bin:$PATH export PIP_DEFAULT_TIMEOUT=60 +VENV_PYTHON_INTERPRETER = $(pipenv --py) + # Set the environment with default exports set -a source $ENV_FILE @@ -18,7 +20,7 @@ set +a # Use Ansible from virtualenv if provided pipenv run \ - ansible-playbook -vvv \ + ansible-playbook -e ansible_python_interpreter=$VENV_PYTHON_INTERPRETER -vvv \ $ATL_DEPLOYMENT_REPOSITORY_CUSTOM_PARAMS \ -e "${PLAYBOOK_INVOCATION_EXTRA_PARAMS}" \ -i $INV \