summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/inventory_docker_swarm/runme.sh
blob: 3eb775a700c79c1e2d59d86f5c2b64c2737eaa14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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