Debian Codegraph @

test/integration/targets/includes/runme.sh

raw
1 #!/usr/bin/env bash
2
3 set -eux
4
5 export ANSIBLE_GATHERING=explicit
6
7 ansible-playbook test_includes.yml -i ../../inventory "$@"
8
9 ansible-playbook inherit_notify.yml "$@"
10
11 echo "EXPECTED ERROR: Ensure we fail if using 'include' to include a playbook."
12 set +e
13 result="$(ansible-playbook -i ../../inventory include_on_playbook_should_fail.yml -v "$@" 2>&1)"
14 set -e
15 grep -q "'include_tasks' is not a valid attribute for a Play" <<< "$result"
16
17 ansible-playbook includes_loop_rescue.yml --extra-vars strategy=linear "$@"
18 ansible-playbook includes_loop_rescue.yml --extra-vars strategy=free "$@"
19
20 ansible-playbook includes_from_dedup.yml -i ../../inventory "$@"
21
22 # test 'rescueable' default (true)
23 ansible-playbook include_role_error_handling.yml "$@"
24 # test 'rescueable' explicit true
25 ansible-playbook include_role_error_handling.yml "$@" -e '{"rescueme": true}'
26 # test 'rescueable' explicit false
27 [[ $(ansible-playbook include_role_error_handling.yml "$@" -e '{"rescueme": false}') != 0 ]]
28 # ensure imports are not rescuable
29 [[ $(ansible-playbook import_no_rescue.yml "$@") != 0 ]]
30
31 # test for missing task_from when missing tasks/
32 ansible-playbook include_role_missing.yml "$@"