2019-03-17 09:16:18 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
[[ -n "$DEBUG" || -n "$ANSIBLE_DEBUG" ]] && set -x
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
cleanup() {
|
|
|
|
echo "Cleanup"
|
|
|
|
ansible-playbook playbooks/swarm_cleanup.yml
|
|
|
|
echo "Done"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
trap cleanup INT TERM EXIT
|
|
|
|
|
|
|
|
echo "Setup"
|
|
|
|
ansible-playbook playbooks/swarm_setup.yml
|
|
|
|
|
|
|
|
echo "Test docker_swarm inventory 1"
|
|
|
|
ansible-playbook -i inventory_1.docker_swarm.yml playbooks/test_inventory_1.yml
|
2019-03-17 11:28:55 +01:00
|
|
|
|
|
|
|
echo "Test docker_swarm inventory 2"
|
|
|
|
ansible-playbook -i inventory_2.docker_swarm.yml playbooks/test_inventory_2.yml
|