mirror of https://github.com/ansible/ansible.git
Provide more information in AnsibleUndefinedVariable (#71666)
* Provide more information in AnsibleUndefinedVariable Fixes #55152pull/71863/head
parent
6984081111
commit
00b22ab55e
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Provide more information in AnsibleUndefinedVariable (https://github.com/ansible/ansible/issues/55152)
|
@ -0,0 +1,15 @@
|
||||
- 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'
|
Loading…
Reference in New Issue