#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"
PLAYBOOK="$DOKKU_LIB_ROOT/data/ansible/$APP/pre-deploy.yml"
REQUIREMENTS="$DOKKU_LIB_ROOT/data/ansible/$APP/requirements.yml"
. $(dirname "$0")/functions
echo "-----> Running pre-deploy ansible playbook"
run_playbook "$PLAYBOOK" "$REQUIREMENTS"