diff --git a/dependencies b/dependencies index 2636300..6441d3a 100755 --- a/dependencies +++ b/dependencies @@ -2,9 +2,15 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -export DEBIAN_FRONTEND=noninteractive +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" -if ! command -v "ansible" &>/dev/null; then - dokku_col_log_info1_quiet "installing ansible" - apt install -qq -y ansible -fi +dokku-ansible-playbook-dependencies() { + export DEBIAN_FRONTEND=noninteractive + + if ! command -v "ansible" &>/dev/null; then + dokku_col_log_info1_quiet "installing ansible" + apt install -qq -y ansible + fi +} + +dokku-ansible-playbook-dependencies "$@" diff --git a/functions b/functions index 94d3518..8b850a2 100755 --- a/functions +++ b/functions @@ -2,6 +2,8 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" + function run_playbook() { local play_path="$1" local requirements="$2" diff --git a/post-deploy b/post-deploy index 8b048b3..36e6cef 100755 --- a/post-deploy +++ b/post-deploy @@ -2,6 +2,8 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" + dokku-ansible-playbook-post-deploy() { declare APP="$1" declare PLAYBOOK="$DOKKU_LIB_ROOT/data/ansible/$APP/post-deploy.yml" diff --git a/pre-deploy b/pre-deploy index 6b4ef93..c58bd5c 100755 --- a/pre-deploy +++ b/pre-deploy @@ -2,6 +2,8 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" + dokku-ansible-playbook-pre-deploy() { declare APP="$1" declare PLAYBOOK="$DOKKU_LIB_ROOT/data/ansible/$APP/pre-deploy.yml"