when statements are already implicitly wrapped in jinja2 templating.

Effectively you just need:

```
when: item in csv_ip_mac_details
```

As simple as removing the {{ }} jinja2 delimiters.

On Tue, Jul 2, 2019 at 9:58 AM Rakesh Parida <[email protected]>
wrote:

> How can i insert value of variables using with items in conditional checks
>
> name: system_ipaddress_mac_combinations present inside fact
>       debug:
>         msg : The system_ip-MAC combinations "{{ item }}" is  present in
> teh fact
>       when: '{{ item }} in {{ csv_ip_mac_details }}'
>       with_items:
>          - "{{ system_ip_mac_details }}"
>
> TASK [system_ipaddress_mac_combinations present inside fact]
> ***********************************************************************************************************
>  [WARNING]: conditional statements should not include jinja2 templating
> delimiters such as {{ }} or {% %}. Found: {{ item }} in {{
> csv_ip_mac_details }}
>
> --
> 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/21685cee-f595-4e88-b2bd-ce6da0c14de2%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/21685cee-f595-4e88-b2bd-ce6da0c14de2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v_9Z21536YohabQkKy8GAzHW8VRd3EQiFN92yA_XDNB7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to