This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
2020-03-19 22:29:59 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
|
|
|
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
|
2020-03-19 22:42:53 +00:00
|
|
|
dokku-ansible-playbook-post-extract() {
|
|
|
|
declare APP="$1" TMPDIR="$2"
|
2020-03-19 22:29:59 +00:00
|
|
|
|
2020-03-19 22:42:53 +00:00
|
|
|
dokku_col_log_info1_quiet "Checking for ansible playbooks supplied in repo"
|
|
|
|
if [[ -d "$TMPDIR/ansible" ]] && [[ "$(ls -A "$TMPDIR/ansible")" ]]; then
|
2020-03-19 22:47:05 +00:00
|
|
|
mkdir -p "$DOKKU_LIB_ROOT/data/ansible/$APP"
|
|
|
|
cp -r "$TMPDIR/ansible/." "$DOKKU_LIB_ROOT/data/ansible/$APP"
|
2020-03-19 22:42:53 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dokku-ansible-playbook-post-extract "$@"
|