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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pushd "$DOKKU_LIB_ROOT/data/ansible/$APP/" >/dev/null
|
||||||
|
|
||||||
if [[ -f "$requirements" ]]; then
|
if [[ -f "$requirements" ]]; then
|
||||||
dokku_col_log_info1_quiet "$requirements file found"
|
dokku_col_log_info1_quiet "$requirements file found"
|
||||||
ansible-galaxy \
|
ansible-galaxy \
|
||||||
install \
|
install \
|
||||||
-vvv --force \
|
-vvv --force \
|
||||||
--roles-path "$DOKKU_LIB_ROOT/data/ansible/$APP/roles" \
|
--roles-path "./roles" \
|
||||||
--role-file "$requirements"
|
--role-file "$requirements"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export ANSIBLE_ROLES_PATH="$DOKKU_LIB_ROOT/data/ansible/$APP/roles/"
|
|
||||||
|
|
||||||
dokku_col_log_info1_quiet "$play_path file found"
|
dokku_col_log_info1_quiet "$play_path file found"
|
||||||
ansible-playbook \
|
ansible-playbook \
|
||||||
--inventory "$(hostname)", \
|
--inventory "$(hostname)", \
|
||||||
--module-path "$ANSIBLE_ROLES_PATH/*/library/" \
|
--module-path "./roles/*/library/" \
|
||||||
--connection local \
|
--connection local \
|
||||||
"$play_path"
|
"$play_path"
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user