Fix paths
This commit is contained in:
parent
6a23c42a7e
commit
5452095123
25
functions
25
functions
@ -28,7 +28,7 @@ dokku-ansible-deploy-deploy-d-create() {
|
||||
|
||||
if [[ ! -d "$DOKKU_LIB_ROOT/data/deploy.d" ]]; then
|
||||
dokku_col_log_info1_quiet "Creating $DOKKU_LIB_ROOT/data/deploy.d"
|
||||
mkdir -p "$DOKKU_LIB_ROOT/data/deploy.d"
|
||||
mkdir -vp "$DOKKU_LIB_ROOT/data/deploy.d"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ dokku-ansible-deploy-vault-pass-cmd() {
|
||||
|
||||
if [[ ! -d "$DOKKU_LIB_ROOT/data/deploy.d/$APP" ]]; then
|
||||
dokku_col_log_info1_quiet "Creating $DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
mkdir -p "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
mkdir -vp "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
fi
|
||||
|
||||
{ echo "#!/bin/bash";
|
||||
@ -89,7 +89,7 @@ dokku-ansible-deploy-dependencies() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="install plugin dependencies"
|
||||
|
||||
declare DEPENDENCIES="ansible python3 python3-dev python3-ruamel.yaml"
|
||||
declare DEPENDENCIES="ansible"
|
||||
declare REQUIREMENTS="$PLUGIN_AVAILABLE_PATH/ansible-deploy/deps/requirements.yml"
|
||||
|
||||
dokku_col_log_info1_quiet "Ensuring the following packages are installed: $DEPENDENCIES"
|
||||
@ -105,9 +105,10 @@ dokku-ansible-deploy-dependencies() {
|
||||
dokku_col_log_info1_quiet "Copying Ansible library modules into place"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
mkdir -p $DOKKU_ROOT/.ansible/{roles,plugins/modules}
|
||||
mkdir -vp $DOKKU_ROOT/.ansible/{roles,plugins/modules}
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cp -R $DOKKU_ROOT/.ansible/roles/*/library/* $DOKKU_ROOT/.ansible/plugins/modules
|
||||
cp -Rv $DOKKU_ROOT/.ansible/roles/*/library/* $DOKKU_ROOT/.ansible/plugins/modules
|
||||
}
|
||||
|
||||
dokku-ansible-deploy-post-extract() {
|
||||
@ -119,9 +120,9 @@ dokku-ansible-deploy-post-extract() {
|
||||
declare APP="$1" TMPDIR="$2"
|
||||
|
||||
if [[ -d "$TMPDIR/deploy.d" ]] && [[ "$(ls -A "$TMPDIR/deploy.d")" ]]; then
|
||||
mkdir -p "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
cp -r "$TMPDIR/deploy.d/." "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
dokku_col_log_info1_quiet "Copied deploy.d files into place"
|
||||
mkdir -vp "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
cp -Rv "$TMPDIR/deploy.d/." "$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
dokku_col_log_info1_quiet "Copied deploy.d files and directories into place"
|
||||
|
||||
if [[ -d "$TMPDIR/deploy.d/vault" ]]; then
|
||||
if [[ ! -f "$DOKKU_LIB_ROOT/data/deploy.d/$APP/.vault.sh" ]]; then
|
||||
@ -132,7 +133,7 @@ dokku-ansible-deploy-post-extract() {
|
||||
fi
|
||||
|
||||
dokku_col_log_info1_quiet "Copying ansibile.cfg into place"
|
||||
cp -rf "$PLUGIN_AVAILABLE_PATH/ansible-deploy/ansible.cfg" /home/dokku/.ansible.cfg
|
||||
cp -Rv "$PLUGIN_AVAILABLE_PATH/ansible-deploy/ansible.cfg" /home/dokku/.ansible.cfg
|
||||
fi
|
||||
}
|
||||
|
||||
@ -146,7 +147,7 @@ dokku-ansible-deploy-pre-deploy() {
|
||||
declare APP_DIR="$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
declare PLUGIN_DIR="$DOKKU_LIB_ROOT/data/deploy.d"
|
||||
declare VAULT_FILE="$APP_DIR/.vault.sh"
|
||||
declare PRE_DEPLOY="$PLUGIN_AVAILABLE_PATH/ansible-deploy/plays/pre_deploy.yml"
|
||||
declare PRE_DEPLOY="$PLUGIN_AVAILABLE_PATH/ansible-deploy/plays/predeploy/predeploy.yml"
|
||||
|
||||
dokku_col_log_info1_quiet "Running pre-deploy steps"
|
||||
|
||||
@ -180,7 +181,7 @@ dokku-ansible-deploy-post-deploy() {
|
||||
declare APP_DIR="$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
declare PLUGIN_DIR="$DOKKU_LIB_ROOT/data/deploy.d"
|
||||
declare VAULT_FILE="$APP_DIR/.vault.sh"
|
||||
declare POST_DEPLOY="$PLUGIN_AVAILABLE_PATH/ansible-deploy/plays/post_deploy.yml"
|
||||
declare POST_DEPLOY="$PLUGIN_AVAILABLE_PATH/ansible-deploy/plays/postdeploy/postdeploy.yml"
|
||||
|
||||
dokku_col_log_info1_quiet "Running post-deploy steps"
|
||||
|
||||
@ -214,7 +215,7 @@ dokku-ansible-deploy-post-delete() {
|
||||
declare APP_DIR="$DOKKU_LIB_ROOT/data/deploy.d/$APP"
|
||||
declare PLUGIN_DIR="$DOKKU_LIB_ROOT/data/deploy.d"
|
||||
declare VAULT_FILE="$APP_DIR/.vault.sh"
|
||||
declare POST_DELETE="$PLUGIN_AVAILABLE_PATH/ansible-deploy/plays/post_delete.yml"
|
||||
declare POST_DELETE="$PLUGIN_AVAILABLE_PATH/ansible-deploy/plays/postdelete/postdelete.yml"
|
||||
|
||||
dokku_col_log_info1_quiet "Running post-delete steps"
|
||||
|
||||
|
Reference in New Issue
Block a user