1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixing bad variable naming choices

This commit is contained in:
James Cammarata 2014-10-10 12:45:33 -05:00
parent 2eda9a3a47
commit fe5a7bcabf
2 changed files with 5 additions and 5 deletions

View file

@ -269,8 +269,8 @@
- name: test a with_items loop using a variable with a missing attribute - name: test a with_items loop using a variable with a missing attribute
debug: var=item debug: var=item
with_items: foo.results with_items: cond_bad_attribute.results
when: foo is defined and 'results' in foo when: cond_bad_attribute is defined and 'results' in cond_bad_attribute
register: result register: result
- name: assert the task was skipped - name: assert the task was skipped
@ -281,7 +281,7 @@
- name: test a with_items loop skipping a single item - name: test a with_items loop skipping a single item
debug: var=item debug: var=item
with_items: items.results with_items: cond_list_of_items.results
when: item != 'b' when: item != 'b'
register: result register: result

View file

@ -2,10 +2,10 @@
# foo is a dictionary that will be used to check that # foo is a dictionary that will be used to check that
# a conditional passes a with_items loop on a variable # a conditional passes a with_items loop on a variable
# with a missing attribute (ie. foo.results) # with a missing attribute (ie. foo.results)
foo: cond_bad_attribute:
bar: a bar: a
items: cond_list_of_items:
results: results:
- a - a
- b - b