ansible/test/integration/targets/order/runme.sh
Brian Coca cfba6dfe91
Ensure play order is obeyed (#49897)
* Ensure play order is obeyed

 it was being ignored depending on other options
 also added tests for each order (except shuffle) both serial and not
 fixes #49846
2019-02-27 18:20:16 -05:00

13 lines
590 B
Bash
Executable file

#!/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