mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Use default on undefined vars in tests. (#17601)
This commit is contained in:
@@ -281,7 +281,7 @@
|
||||
- block:
|
||||
- name: test a with_items loop using a variable with a missing attribute
|
||||
debug: var=item
|
||||
with_items: "{{cond_bad_attribute.results}}"
|
||||
with_items: "{{cond_bad_attribute.results | default('')}}"
|
||||
register: result
|
||||
- set_fact: skipped_bad_attribute=False
|
||||
- name: assert the task was skipped
|
||||
|
||||
Reference in New Issue
Block a user