This also works:

|--- - name: List subtraction gather_facts: no hosts: localhost vars: selection: [ 1, 4, 5, 7] tasks: - name: Subtract one from each selection debug: msg: "{{ selection| zip_longest([-1], fillvalue=-1) | map('sum') }}" |

​

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ecf4fac6-4478-2fbc-53ad-4733777151fb%40gmail.com.

Reply via email to