ansible/test/integration/targets/template/undefined_var_info.yml
Martin Krizek 00b22ab55e
Provide more information in AnsibleUndefinedVariable (#71666)
* Provide more information in AnsibleUndefinedVariable

Fixes #55152
2020-09-22 09:38:53 -04:00

15 lines
297 B
YAML

- hosts: localhost
gather_facts: no
vars:
foo: []
bar: "{{ foo[0] }}"
tasks:
- debug:
msg: "{{ bar }}"
register: result
ignore_errors: yes
- assert:
that:
- '"foo[0]" in result.msg'
- '"object has no element 0" in result.msg'