mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cfba6dfe91
* 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
13 lines
590 B
Bash
Executable file
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
|