diff options
Diffstat (limited to 'test/integration/targets/template/undefined_var_info.yml')
-rw-r--r-- | test/integration/targets/template/undefined_var_info.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/integration/targets/template/undefined_var_info.yml b/test/integration/targets/template/undefined_var_info.yml new file mode 100644 index 0000000..b96a58d --- /dev/null +++ b/test/integration/targets/template/undefined_var_info.yml @@ -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' |