2020-04-28 19:55:26 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# run type tests
|
|
|
|
ansible-playbook -i ../../inventory types.yml -v "$@"
|
2020-05-19 23:20:08 +02:00
|
|
|
|
|
|
|
# test timeout
|
|
|
|
ansible-playbook -i ../../inventory timeout.yml -v "$@"
|
2021-04-09 16:28:24 +02:00
|
|
|
|
|
|
|
echo "EXPECTED ERROR: Ensure we fail properly if a playbook is an empty list."
|
|
|
|
set +e
|
|
|
|
result="$(ansible-playbook -i ../../inventory empty.yml -v "$@" 2>&1)"
|
|
|
|
set -e
|
|
|
|
grep -q "ERROR! A playbook must contain at least one play" <<< "$result"
|