Thanks Alwin, the number of elements in the list could vary.  

This is what I was looking for.

    - shell: echo {{ item.0 }} is {{ item.1 }}
      with_together:
        - "{{ old }}"
        - "{{ new }}"

Regards.

On Wednesday, 23 September 2015 16:27:40 UTC+10, Alwin Schoemaker wrote:
>
> The injected *old* and *new* are injected as an array. Try it like this:
>
> - shell: echo {{ item.old }} is {{ item.new }}
>     with_items:
>       - { old: '{{ old[0] }}', new: '{{ new[0] }}' }
>       - { old: '{{ old[1] }}', new: '{{ new[1] }}' }
>
>
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0e53fc09-dc88-4391-84ea-d7783d1a1a47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to