Brian Coca:
> ah, misunderstood the question, you wan to combine the nested and together
> lookups (possible example):
> 
> with_nested:
>  - "{{tcpports}}"
>  - "{{lookup('together', [ansible_all_ipv4_addresses,
>  ansible_all_ipv6_addresses | ipv6('public')] }}"

Since I certainly will need this again, I actually gave it a try, but
got this error:

Failed to template {{lookup('together', [ansible_all_ipv4_addresses,
ansible_all_ipv6_addresses]) }}: an unexpected type error occurred.
Error was sequence item 0: expected string, list found


 vars:
    tcpports:
        - 1
        - 2
 tasks:

   - debug: msg="going to bind to port {{ item.0 }} ipv4 {{ item.1.0 }}
ipv6 {{ item.1.1 }} "
     with_nested:
        - "{{tcpports}}"
        - "{{lookup('together', [ansible_all_ipv4_addresses,
ansible_all_ipv6_addresses]) }}"

-- 
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/56BE769A.8080206%40openmailbox.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to