Format and add missing shellcheck exceptions
This commit is contained in:
parent
3c922ea8b4
commit
12c0d52e47
2
commands
2
commands
@ -8,7 +8,7 @@ case "$1" in
|
|||||||
|
|
||||||
help | ansible-deploy:help)
|
help | ansible-deploy:help)
|
||||||
help_content_func() {
|
help_content_func() {
|
||||||
#shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
declare desc="return ansible-deploy plugin help content"
|
declare desc="return ansible-deploy plugin help content"
|
||||||
cat<<help_content
|
cat<<help_content
|
||||||
ansible-deploy:vault-pass appname, Add new app vault password for decrypting secrets
|
ansible-deploy:vault-pass appname, Add new app vault password for decrypting secrets
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# shellcheck disable=SC1090
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ansible-deploy/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ansible-deploy/functions"
|
||||||
|
|
||||||
dokku-ansible-deploy-dependencies "$@"
|
dokku-ansible-deploy-dependencies "$@"
|
||||||
|
12
functions
12
functions
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# shellcheck disable=SC1090
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||||
|
|
||||||
dokku-ansible-deploy-validate-dependencies() {
|
dokku-ansible-deploy-validate-dependencies() {
|
||||||
#shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
declare desc="check that ansible dependencies are available"
|
declare desc="check that ansible dependencies are available"
|
||||||
|
|
||||||
if ! command -v "ansible-playbook" &>/dev/null; then
|
if ! command -v "ansible-playbook" &>/dev/null; then
|
||||||
@ -15,7 +16,7 @@ dokku-ansible-deploy-validate-dependencies() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dokku-ansible-deploy-vault-pass-cmd() {
|
dokku-ansible-deploy-vault-pass-cmd() {
|
||||||
#shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
declare desc="add new app vault password for decryption of passwords"
|
declare desc="add new app vault password for decryption of passwords"
|
||||||
|
|
||||||
local app="$2"
|
local app="$2"
|
||||||
@ -31,6 +32,7 @@ dokku-ansible-deploy-vault-pass-cmd() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# shellcheck disable=SC2162 disable=SC2116 disable=SC2006
|
||||||
read -p "Please enter your vault password for $app: `echo $'\n> '`" vault_password
|
read -p "Please enter your vault password for $app: `echo $'\n> '`" vault_password
|
||||||
|
|
||||||
if [[ ! -d "$DOKKU_LIB_ROOT/data/deploy.d/$app" ]]; then
|
if [[ ! -d "$DOKKU_LIB_ROOT/data/deploy.d/$app" ]]; then
|
||||||
@ -50,19 +52,19 @@ dokku-ansible-deploy-vault-pass-cmd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dokku-ansible-deploy-dependencies() {
|
dokku-ansible-deploy-dependencies() {
|
||||||
#shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
declare desc="install plugin dependencies"
|
declare desc="install plugin dependencies"
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
if ! command -v "ansible" &>/dev/null; then
|
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 python3 python3-dev
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
dokku-ansible-deploy-post-extract() {
|
dokku-ansible-deploy-post-extract() {
|
||||||
#shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
declare desc="run the post-extract hook to setup the plugin"
|
declare desc="run the post-extract hook to setup the plugin"
|
||||||
|
|
||||||
declare APP="$1" TMPDIR="$2"
|
declare APP="$1" TMPDIR="$2"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# shellcheck disable=SC1090
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ansible-deploy/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ansible-deploy/functions"
|
||||||
|
|
||||||
dokku-ansible-deploy-post-extract "$@"
|
dokku-ansible-deploy-post-extract "$@"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# shellcheck disable=SC1090
|
||||||
source "$PLUGIN_AVAILABLE_PATH/ansible-deploy/functions"
|
source "$PLUGIN_AVAILABLE_PATH/ansible-deploy/functions"
|
||||||
|
|
||||||
dokku-ansible-deploy-vault-pass-cmd "$@"
|
dokku-ansible-deploy-vault-pass-cmd "$@"
|
||||||
|
Reference in New Issue
Block a user