You declare 'loop_var: svc_port' but that var already exists as one of the
two variables of with_together. That won't work, you need to pick some
other name.
Also, loop_var in the context of with_together will be a list of two vars
(values from proto and svc_port).



On Tue, 12 May 2020 at 11:42, Diyawary <[email protected]> wrote:

> Hi team,
> could you please help me how to give two loop_vars for corresponding list
> for with_together module
>
> my requirement is ,i am calling a role and where looping with_togetjher
> - include_role:
>           name: validatetcp_port
>    when: item.0 ==  'tcp'
>    with_together:
>       -  "{{ proto}}"
>       -   "{{ svc_port}}"
>    loop_control:
>       loop_var: svc_port
>
>  this is not working .my inner yml is only utilizing svc_port  and for
> when condition I need  item of proto  list. in my inner yml already a loop
> so without loop control it is not working. in current loop_var for inner
> yml its passing whole list of svc_port as a single item.
>  so please suggest me how i can apply loop_vars
>
>
>
> --
> 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/9490a147-8917-4c6f-a8eb-cca5cfd778c6%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/9490a147-8917-4c6f-a8eb-cca5cfd778c6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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/CAL8fbwO0o2zccTHowPfxKShPXqUu8dmYWUDQzjTdRU3S%3D205Pg%40mail.gmail.com.

Reply via email to