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/undefined/tasks/main.yml

17 lines
408 B
YAML

- set_fact:
names: '{{ things|map(attribute="name") }}'
vars:
things:
- name: one
- name: two
- notname: three
- name: four
ignore_errors: true
register: undefined_set_fact
- assert:
that:
- '("%r"|format(undefined_variable)).startswith("AnsibleUndefined")'
- undefined_set_fact is failed
- undefined_set_fact.msg is contains 'undefined variable'