mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Document and test 'is undefined' rather than 'is not defined'
According to https://github.com/ansible/ansible/issues/10273, this syntax should work better for nested dicts.
This commit is contained in:
@@ -90,7 +90,7 @@ If a required variable has not been set, you can skip or fail using Jinja2's
|
||||
when: foo is defined
|
||||
|
||||
- fail: msg="Bailing out. this play requires 'bar'"
|
||||
when: bar is not defined
|
||||
when: bar is undefined
|
||||
|
||||
This is especially useful in combination with the conditional import of vars
|
||||
files (see below).
|
||||
|
||||
Reference in New Issue
Block a user