diff --git a/tests/shell/lab.sh b/tests/shell/lab.sh index 3becffbd6b..3a528255ee 100644 --- a/tests/shell/lab.sh +++ b/tests/shell/lab.sh @@ -45,9 +45,7 @@ if [[ $? -ne 0 ]]; then fi # Ansible playbooks are in the prior folder, launch from there -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd ${DIR} -cd .. +cd $(dirname "${BASH_SOURCE[0]}")/.. set -o pipefail ansible-playbook --private-key ${SSH_KEY_LOCATION} ansible/${targetEnvironment}-provision.yml | tee ansible-${targetEnvironment}-${labName}-provision.log diff --git a/tests/shell/provision-and-destroy.sh b/tests/shell/provision-and-destroy.sh index 1655beb658..e6767b3c82 100644 --- a/tests/shell/provision-and-destroy.sh +++ b/tests/shell/provision-and-destroy.sh @@ -16,8 +16,6 @@ if [[ $? -ne 0 ]]; then fi # Ansible playbooks are in the prior folder, launch from there -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd ${DIR} -cd .. +cd $(dirname "${BASH_SOURCE[0]}")/.. ansible-playbook ansible/${targetEnvironment}-provision.yml && ansible-playbook ansible/${targetEnvironment}-cleanup.yml