From 5c6baaac58f73553e877e539a46a69ded68bf744 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Fri, 20 Mar 2020 00:42:02 +0100 Subject: [PATCH] Localise command calling --- functions | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/functions b/functions index 3c96e23..7d3ce21 100755 --- a/functions +++ b/functions @@ -14,21 +14,23 @@ function run_playbook() { exit 0 fi + pushd "$DOKKU_LIB_ROOT/data/ansible/$APP/" >/dev/null + if [[ -f "$requirements" ]]; then dokku_col_log_info1_quiet "$requirements file found" ansible-galaxy \ install \ -vvv --force \ - --roles-path "$DOKKU_LIB_ROOT/data/ansible/$APP/roles" \ + --roles-path "./roles" \ --role-file "$requirements" fi - export ANSIBLE_ROLES_PATH="$DOKKU_LIB_ROOT/data/ansible/$APP/roles/" - dokku_col_log_info1_quiet "$play_path file found" ansible-playbook \ --inventory "$(hostname)", \ - --module-path "$ANSIBLE_ROLES_PATH/*/library/" \ + --module-path "./roles/*/library/" \ --connection local \ "$play_path" + + popd >/dev/null }