mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
b35ac8080f
`items` is a *terrible* return key for ansible as Jinja will often think it refers to the `items()` function. Even though you can typically work around this with `results['items']`, sometimes even that doesn't work: ``` - name: Resources should exist assert: that: item.status.phase == 'Active' loop: "{{ k8s_namespaces['items'] }}" ``` ``` fatal: [testhost]: FAILED! => {"msg": "Invalid data passed to 'loop', it requires a list, got this instead: <built-in method items of dict object at 0x109dc9c58>. Hint: If you passed a list/dict of just one element, try adding wantlist=True to your lookup invocation or use q/query instead of lookup."} ``` Change it now while we still can. |
||
---|---|---|
.. | ||
ansible |