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/jinja2_native_types/nested_undefined.yml

24 lines
647 B
YAML

- hosts: localhost
gather_facts: no
tasks:
- block:
- name: Test nested undefined var fails, single node
debug:
msg: "{{ [{ 'key': nested_and_undefined }] }}"
register: result
ignore_errors: yes
- assert:
that:
- "\"'nested_and_undefined' is undefined\" in result.msg"
- name: Test nested undefined var fails, multiple nodes
debug:
msg: "{{ [{ 'key': nested_and_undefined}] }} second_node"
register: result
ignore_errors: yes
- assert:
that:
- "\"'nested_and_undefined' is undefined\" in result.msg"