Debian Codegraph @

test/integration/targets/ignore_errors/runme.sh

raw
1 #!/usr/bin/env bash
2 set -eux
3
4 ansible-playbook -i ../../inventory test_ignore_errors.yml "$@"
5
6 ansible-playbook -i ../../inventory test_invalid_ignore_errors.yml "$@" | tee out.txt || true
7 grep 'CHECKS PASSED' out.txt
8
9 # RPFIX-5: BUG: ignore_errors is incorrectly handled on loop items
10 # ansible-playbook -i ../../inventory test_ignore_errors_loop.yml "$@" | tee out.txt || true
11 # grep 'CHECKS PASSED' out.txt
12
13 ansible-playbook test_looped_errors.yml "$@" | tee out.txt
14 grep "dynamichost.*ok=3.*failed=1.*ignored=2" out.txt
15
16 if ansible-playbook -i ../../inventory test_ignore_errors_false.yml "$@" > out.txt; then
17 echo 'Playbook expected to fail succeeded'
18 exit 1
19 fi
20
21 # The first task should fail and not be ignored
22 grep 'testhost.*ok=0.*failed=1.*ignored=0' out.txt
23 echo PASS