mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-17 22:30:59 +00:00
Fixing bad variable naming choices
This commit is contained in:
@@ -269,8 +269,8 @@
|
||||
|
||||
- name: test a with_items loop using a variable with a missing attribute
|
||||
debug: var=item
|
||||
with_items: foo.results
|
||||
when: foo is defined and 'results' in foo
|
||||
with_items: cond_bad_attribute.results
|
||||
when: cond_bad_attribute is defined and 'results' in cond_bad_attribute
|
||||
register: result
|
||||
|
||||
- name: assert the task was skipped
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
- name: test a with_items loop skipping a single item
|
||||
debug: var=item
|
||||
with_items: items.results
|
||||
with_items: cond_list_of_items.results
|
||||
when: item != 'b'
|
||||
register: result
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# foo is a dictionary that will be used to check that
|
||||
# a conditional passes a with_items loop on a variable
|
||||
# with a missing attribute (ie. foo.results)
|
||||
foo:
|
||||
cond_bad_attribute:
|
||||
bar: a
|
||||
|
||||
items:
|
||||
cond_list_of_items:
|
||||
results:
|
||||
- a
|
||||
- b
|
||||
|
||||
Reference in New Issue
Block a user