Re: [ansible-project] iterating over IPv4/IPv6 (parallel) + TCP ports (nested)

2016-02-14 Thread nusenu
> sorry, did not test, surprised it does not take a list, maybe it has to be > quoted ? I'm not able to get this to work, if anyone is, please let me know. There is no documentations about lookup('together', ..) on https://docs.ansible.com/ansible/playbooks_lookups.html I made a request for docu

Re: [ansible-project] iterating over IPv4/IPv6 (parallel) + TCP ports (nested)

2016-02-12 Thread Brian Coca
sorry, did not test, surprised it does not take a list, maybe it has to be quoted ? -- Brian Coca -- 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 an

Re: [ansible-project] iterating over IPv4/IPv6 (parallel) + TCP ports (nested)

2016-02-12 Thread nusenu
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 thi

Re: [ansible-project] iterating over IPv4/IPv6 (parallel) + TCP ports (nested)

2016-02-12 Thread 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')] }}" -- Brian Coca -- You received this message becau

Re: [ansible-project] iterating over IPv4/IPv6 (parallel) + TCP ports (nested)

2016-02-12 Thread nusenu
> with_items: > - {{ ansible_all_ipv4_addresses }} > - {{ ansible_all_ipv6_addresses | ipv6('public') }} > - tcpports > > > ^ will flatten to single list > > or you can use union to get unique single list: > > with_items: "{{ > tcpports|union(ansible_all_ipv4_addresses|union(ansible_all_ipv6_ad

Re: [ansible-project] iterating over IPv4/IPv6 (parallel) + TCP ports (nested)

2016-02-12 Thread Brian Coca
with_items: - {{ ansible_all_ipv4_addresses }} - {{ ansible_all_ipv6_addresses | ipv6('public') }} - tcpports ^ will flatten to single list or you can use union to get unique single list: with_items: "{{ tcpports|union(ansible_all_ipv4_addresses|union(ansible_all_ipv6_addresses | ipv6('public')

Re: [ansible-project] iterating over IPv4/IPv6 (parallel) + TCP ports (nested)

2016-02-12 Thread nusenu
> similar to a question from about a year ago [1], I'm looking for the > best way to loop over 3 lists: > > - {{ ansible_all_ipv4_addresses }} > - {{ ansible_all_ipv6_addresses | ipv6('public') }} > - tcpports > > > ipv4 and ipv6 IPs should iterate in parallel (I'll check that their list > lengt

[ansible-project] iterating over IPv4/IPv6 (parallel) + TCP ports (nested)

2016-02-11 Thread nusenu
Hi, similar to a question from about a year ago [1], I'm looking for the best way to loop over 3 lists: - {{ ansible_all_ipv4_addresses }} - {{ ansible_all_ipv6_addresses | ipv6('public') }} - tcpports ipv4 and ipv6 IPs should iterate in parallel (I'll check that their list lengths are matching