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/filter_core/handle_undefined_type_error...

30 lines
609 B
YAML

- hosts: localhost
gather_facts: false
tasks:
- debug: msg={{item}}
with_dict: '{{myundef}}'
when:
- myundef is defined
register: shouldskip
- name: check if skipped
assert:
that:
- shouldskip is skipped
- debug: msg={{item}}
loop: '{{myundef|dict2items}}'
when:
- myundef is defined
- debug: msg={{item}}
with_dict: '{{myundef}}'
register: notskipped
ignore_errors: true
- name: check it failed
assert:
that:
- notskipped is not skipped
- notskipped is failed