Add dependency check
This commit is contained in:
parent
8748b09dce
commit
e9815d0c32
@ -4,12 +4,19 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
|
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
|
function validate_dependencies() {
|
||||||
|
if ! command -v "ansible-playbook" &>/dev/null; then
|
||||||
|
log-fail "Missing ansible-playbook, run dokku plugin:install-dependencies"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function run_playbook() {
|
function run_playbook() {
|
||||||
local app="$1"
|
local app="$1"
|
||||||
local play_path="$2"
|
local play_path="$2"
|
||||||
local requirements="$3"
|
local requirements="$3"
|
||||||
|
|
||||||
|
validate_dependencies
|
||||||
|
|
||||||
export ANSIBLE_ROLES_PATH="$DOKKU_LIB_ROOT/data/ansible/$APP/roles"
|
export ANSIBLE_ROLES_PATH="$DOKKU_LIB_ROOT/data/ansible/$APP/roles"
|
||||||
export ANSIBLE_LIBRARY="$DOKKU_LIB_ROOT/data/ansible/$APP/roles/*/library"
|
export ANSIBLE_LIBRARY="$DOKKU_LIB_ROOT/data/ansible/$APP/roles/*/library"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user