Hi Mat,
Thanks for the suggestion.
That worked for me as a charm :)
On Tuesday, July 2, 2019 at 8:30:50 PM UTC+5:30, Matt Martz wrote:
>
> 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]
> <javascript:>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> 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/1d9cec04-7289-46b7-baaa-6e28895bf31e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.