This repository has been archived on 2020-05-07. You can view files and clone it, but cannot push or open issues or pull requests.
dokku-ansible-deploy/commands

48 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2020-04-07 14:10:31 +00:00
#!/usr/bin/env bash
2020-04-07 14:52:18 +00:00
[[ " help ansible-deploy:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | ansible-deploy:help)
help_content_func() {
# shellcheck disable=SC2034
2020-04-07 14:52:18 +00:00
declare desc="return ansible-deploy plugin help content"
cat<<help_content
2020-04-08 10:22:49 +00:00
ansible-deploy:vault-pass appname, Add new app vault password for decrypting secrets
ansible-deploy:sudo-pass, Add system Dokku user sudo password for sudo escalation
2020-04-07 14:52:18 +00:00
help_content
}
if [[ $1 = "ansible-deploy:help" ]]; then
echo -e 'Usage: dokku ansible-deploy:COMMAND'
echo ''
echo 'Deploy applications on Dokku using Ansible'
echo ''
echo 'Commands:'
help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
help_content_func
else
cat<<help_desc
ansible-deploy, Deploy applications on Dokku using Ansible.
help_desc
fi
;;
vault-pass)
dokku-ansible-deploy-vault-pass-cmd "$@"
;;
sudo-pass)
dokku-ansible-deploy-sudo-pass-cmd
;;
2020-04-07 14:52:18 +00:00
*)
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
;;
esac