Localise command calling
This commit is contained in:
parent
9e48f5e454
commit
5c6baaac58
10
functions
10
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user