Add post-delete hook

This commit is contained in:
Luke Murphy 2020-03-22 12:11:21 +01:00
parent 8afb5b411b
commit b47fb31a4b
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 18 additions and 0 deletions

18
post-delete Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
dokku-ansible-playbook-post-delete() {
declare APP="$1"
declare PLAYBOOK="$DOKKU_LIB_ROOT/data/ansible/$APP/post-delete.yml"
declare REQUIREMENTS="$DOKKU_LIB_ROOT/data/ansible/$APP/requirements.yml"
. $(dirname "$0")/functions
dokku_col_log_info1_quiet "Running post-delete ansible playbook"
dokku-ansible-playbook-run "$APP" "$PLAYBOOK" "$REQUIREMENTS"
}
dokku-ansible-playbook-post-delete "$@"