mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +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:
@@ -148,6 +148,16 @@
|
||||
that:
|
||||
- "result.skipped == true"
|
||||
|
||||
- name: test bad conditional 'is undefined'
|
||||
shell: echo 'testing'
|
||||
when: test_bare is undefined
|
||||
register: result
|
||||
|
||||
- name: assert bad conditional 'is undefined' did NOT run
|
||||
assert:
|
||||
that:
|
||||
- "result.skipped == true"
|
||||
|
||||
- name: test bare conditional
|
||||
shell: echo 'testing'
|
||||
when: test_bare
|
||||
|
||||
Reference in New Issue
Block a user