1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/order/runme.sh

14 lines
590 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -eux
for EXTRA in '{"inputlist": ["hostB", "hostA", "hostD", "hostC"]}' \
'{"myorder": "inventory", "inputlist": ["hostB", "hostA", "hostD", "hostC"]}' \
'{"myorder": "sorted", "inputlist": ["hostA", "hostB", "hostC", "hostD"]}' \
'{"myorder": "reverse_sorted", "inputlist": ["hostD", "hostC", "hostB", "hostA"]}' \
'{"myorder": "reverse_inventory", "inputlist": ["hostC", "hostD", "hostA", "hostB"]}'
do
rm shostlist.txt hostlist.txt || true
ansible-playbook order.yml --forks 1 -i inventory -e "$EXTRA" "$@"
done