diff options
Diffstat (limited to 'test/integration/targets/ignore_unreachable/runme.sh')
-rwxr-xr-x | test/integration/targets/ignore_unreachable/runme.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/integration/targets/ignore_unreachable/runme.sh b/test/integration/targets/ignore_unreachable/runme.sh new file mode 100755 index 0000000..5b0ef19 --- /dev/null +++ b/test/integration/targets/ignore_unreachable/runme.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -eux + +export ANSIBLE_CONNECTION_PLUGINS=./fake_connectors +# use fake connectors that raise srrors at different stages +ansible-playbook test_with_bad_plugins.yml -i inventory -v "$@" +unset ANSIBLE_CONNECTION_PLUGINS + +ansible-playbook test_cannot_connect.yml -i inventory -v "$@" + +if ansible-playbook test_base_cannot_connect.yml -i inventory -v "$@"; then + echo "Playbook intended to fail succeeded. Connection succeeded to nonexistent host" + exit 99 +else + echo "Connection to nonexistent hosts failed without using ignore_unreachable. Success!" +fi |