diff options
author | Matt Martz <matt@sivel.net> | 2019-04-10 10:35:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-10 10:35:31 -0500 |
commit | e89f8bae86518d9b3548b9744046817751336fa7 (patch) | |
tree | d241da120b12356e921c4d285c6570eb05df842f /test/integration/targets/template | |
parent | 877ce12970b67f05202620e01be503b284e28572 (diff) | |
download | ansible-e89f8bae86518d9b3548b9744046817751336fa7.tar.gz |
Extend jinja2 nested undefined support to keys/indices (#55094)
Diffstat (limited to 'test/integration/targets/template')
-rw-r--r-- | test/integration/targets/template/tasks/main.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/integration/targets/template/tasks/main.yml b/test/integration/targets/template/tasks/main.yml index 64d08fe32c..6fd25e1095 100644 --- a/test/integration/targets/template/tasks/main.yml +++ b/test/integration/targets/template/tasks/main.yml @@ -666,6 +666,24 @@ - list_var.0.foo.bar | default('DEFAULT') == 'DEFAULT' - list_var.1.foo is not defined - list_var.1.foo | default('DEFAULT') == 'DEFAULT' + - dict_var is defined + - dict_var['bar'] is defined + - dict_var['bar']['baz'] is not defined + - dict_var['bar']['baz'] | default('DEFAULT') == 'DEFAULT' + - dict_var['bar']['baz']['abc'] is not defined + - dict_var['bar']['baz']['abc'] | default('DEFAULT') == 'DEFAULT' + - dict_var['baz'] is not defined + - dict_var['baz']['abc'] is not defined + - dict_var['baz']['abc'] | default('DEFAULT') == 'DEFAULT' + - list_var[0] is defined + - list_var[1] is not defined + - list_var[0]['foo'] is defined + - list_var[0]['foo']['bar'] is not defined + - list_var[0]['foo']['bar'] | default('DEFAULT') == 'DEFAULT' + - list_var[1]['foo'] is not defined + - list_var[1]['foo'] | default('DEFAULT') == 'DEFAULT' + - dict_var['bar'].baz is not defined + - dict_var['bar'].baz | default('DEFAULT') == 'DEFAULT' - template: src: template_destpath_test.j2 |