Add common functions
This commit is contained in:
parent
50b2c86429
commit
b5eb80147a
12
dependencies
12
dependencies
@ -2,9 +2,15 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
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-ansible-playbook-dependencies() {
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
if ! command -v "ansible" &>/dev/null; then
|
||||||
dokku_col_log_info1_quiet "installing ansible"
|
dokku_col_log_info1_quiet "installing ansible"
|
||||||
apt install -qq -y ansible
|
apt install -qq -y ansible
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
dokku-ansible-playbook-dependencies "$@"
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
function run_playbook() {
|
function run_playbook() {
|
||||||
local play_path="$1"
|
local play_path="$1"
|
||||||
local requirements="$2"
|
local requirements="$2"
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
dokku-ansible-playbook-post-deploy() {
|
dokku-ansible-playbook-post-deploy() {
|
||||||
declare APP="$1"
|
declare APP="$1"
|
||||||
declare PLAYBOOK="$DOKKU_LIB_ROOT/data/ansible/$APP/post-deploy.yml"
|
declare PLAYBOOK="$DOKKU_LIB_ROOT/data/ansible/$APP/post-deploy.yml"
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
dokku-ansible-playbook-pre-deploy() {
|
dokku-ansible-playbook-pre-deploy() {
|
||||||
declare APP="$1"
|
declare APP="$1"
|
||||||
declare PLAYBOOK="$DOKKU_LIB_ROOT/data/ansible/$APP/pre-deploy.yml"
|
declare PLAYBOOK="$DOKKU_LIB_ROOT/data/ansible/$APP/pre-deploy.yml"
|
||||||
|
Reference in New Issue
Block a user