You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/template
Zac Medico 501fc7a248 template: fix KeyError: 'undefined variable: 0 (#27972)
* template: fix KeyError: 'undefined variable: 0

For compatibility with the Context.get_all() implementation
in jinja 2.9, make AnsibleJ2Vars implement collections.Mapping.
Also, make AnsibleJ2Template.newcontext() handle dict type
for the 'vars' parameter.

See: d67f0fd4cc
Fixes: https://github.com/ansible/ansible/issues/20494

* add units/template/test_vars

* intg tests for jinja-2.9 issues like 20494

test cases here are based on
https://github.com/ansible/ansible/issues/20494#issue-202108318
7 years ago
..
files template: fix KeyError: 'undefined variable: 0 (#27972) 7 years ago
meta Fix cosmetic problems in YAML source 8 years ago
tasks template: fix KeyError: 'undefined variable: 0 (#27972) 7 years ago
templates template: fix KeyError: 'undefined variable: 0 (#27972) 7 years ago
vars Don't restrict local jinja2 variables to those that start with l_ 8 years ago
aliases Initial ansible-test implementation. (#18556) 8 years ago