Any good way to have with_items skip None or ‘Null’ items with out using objects or having a when != ‘None’
- name: skip none items
command: echo {{item}}
with_items: - 1
- 2
- “{{3 if false else None}}”
- 4
would echo 1, 2, 4
omit doesn’t seem to work.
Any good way to have with_items skip None or ‘Null’ items with out using objects or having a when != ‘None’
would echo 1, 2, 4
omit doesn’t seem to work.
`when: item is not None`
This requires all with_items to have this tho. Also aren’t None converted to empty strings?
That would be news to me.