Debian Codegraph @

test/integration/targets/template/runme.sh

raw
1 #!/usr/bin/env bash
2
3 set -eux
4
5 ANSIBLE_CALLBACK_RESULT_FORMAT=yaml ANSIBLE_ROLES_PATH=../ ansible-playbook template.yml -i ../../inventory -v "$@"
6
7 # Test for https://github.com/ansible/ansible/pull/35571
8 echo "presence of an undefined var in a template should not break things that don't access it"
9 ansible testhost -i testhost, -m assert -a 'that=var3=="accessme"' -e "vars1={{ bogus_var }}" -e "var2={{ var1 }}" -e var3=accessme
10
11 # ansible_managed tests
12 ANSIBLE_CONFIG=ansible_managed.cfg ansible-playbook ansible_managed.yml -i ../../inventory -v "$@"
13
14 # same as above but with ansible_managed j2 template
15 ANSIBLE_CONFIG=ansible_managed_templated.cfg ansible-playbook ansible_managed.yml -i ../../inventory -v "$@"
16
17 # Test for #42585
18 ANSIBLE_ROLES_PATH=../ ansible-playbook custom_template.yml -i ../../inventory -v "$@"
19
20
21 # Test for several corner cases #57188
22 ansible-playbook corner_cases.yml -v "$@"
23
24 # Test for #57351
25 ansible-playbook filter_plugins.yml -v "$@"
26
27 # https://github.com/ansible/ansible/issues/68699
28 ansible-playbook unused_vars_include.yml -v "$@"
29
30 # https://github.com/ansible/ansible/issues/55152
31 ansible-playbook undefined_var_info.yml -v "$@"
32
33 # https://github.com/ansible/ansible/issues/72615
34 ansible-playbook 72615.yml -v "$@"
35
36 # https://github.com/ansible/ansible/issues/6653
37 ansible-playbook 6653.yml -v "$@"
38
39 # https://github.com/ansible/ansible/issues/72262
40 ansible-playbook 72262.yml -v "$@"
41
42 # ensure unsafe is preserved, even with extra newlines
43 ansible-playbook unsafe.yml -v "$@"
44
45 # ensure Jinja2 overrides from a template are used
46 ansible-playbook template_overrides.yml -v "$@"
47
48 ansible-playbook lazy_eval.yml -i ../../inventory -v "$@"
49
50 ansible-playbook undefined_in_import.yml -i ../../inventory -v "$@"
51
52 # ensure diff null configs work #76493
53 for badcfg in "badnull1" "badnull2" "badnull3"
54 do
55 [ -f "./${badcfg}.cfg" ]
56 ANSIBLE_CONFIG="./${badcfg}.cfg" ansible-config dump --only-changed
57 done
58
59 # ensure we pickle hostvars correctly with native https://github.com/ansible/ansible/issues/83503
60 ANSIBLE_JINJA2_NATIVE=1 ansible -m debug -a "msg={{ groups.all | map('extract', hostvars) }}" -i testhost, all -c local -v "$@"
61
62 # https://github.com/ansible/ansible/issues/87491
63 ansible-playbook missing_src_failed_when_87491.yml -v "$@"