mirror of https://github.com/ansible/ansible.git
Fixing item loop when undefined variable errors occur because of missing attributes
Fixes a case where the variable 'foo' may exist, but the with_items loop was used on something like 'foo.results', where 'results' was not a valid attribute of 'foo'. Prior to this patch, conditionals were not evaluated until later, meaning there was no opportunity to allow a test to skip the task or item based on it being undefined.pull/9310/head
parent
b4f84c5d9a
commit
2eda9a3a47
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# 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:
|
||||||
|
bar: a
|
||||||
|
|
||||||
|
items:
|
||||||
|
results:
|
||||||
|
- a
|
||||||
|
- b
|
||||||
|
- c
|
||||||
|
|
Loading…
Reference in New Issue