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.
dokku-ansible-playbook/commands

43 lines
1.0 KiB
Plaintext
Raw Normal View History

2020-03-21 22:28:04 +00:00
#!/usr/bin/env bash
2020-03-21 23:50:52 +00:00
[[ " help ansible-playbook:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
2020-03-21 22:28:04 +00:00
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in
2020-03-21 23:50:52 +00:00
help | ansible-playbook:help)
2020-03-21 22:28:04 +00:00
help_content_func() {
2020-03-21 22:34:06 +00:00
#shellcheck disable=SC2034
2020-03-21 22:28:04 +00:00
declare desc="return ansible-playbook plugin help content"
cat<<help_content
2020-03-21 23:50:52 +00:00
ansible-playbook:vault-pass, Insert new vault password for encrypt/decrypt of passwords
2020-03-21 22:28:04 +00:00
help_content
}
2020-03-21 23:50:52 +00:00
if [[ $1 = "ansible-playbook:help" ]]; then
echo -e 'Usage: dokku ansible-playbook:COMMAND'
2020-03-21 22:28:04 +00:00
echo ''
echo 'Run ansible playbooks during deployment'
echo ''
2020-03-21 22:34:06 +00:00
echo 'Commands:'
help_content_func | sort | column -c2 -t -s,
2020-03-21 22:28:04 +00:00
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
help_content_func
else
cat<<help_desc
2020-03-21 23:50:52 +00:00
ansible-playbook, Run ansible playbooks during deployment
2020-03-21 22:28:04 +00:00
help_desc
fi
;;
2020-03-21 23:33:12 +00:00
vault-pass)
dokku-ansible-playbook-vault-pass-cmd "$@"
;;
2020-03-21 22:28:04 +00:00
*)
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
;;
esac