Can you help me

On Thu, 27 Sep 2018, 19:49 Kunalsing Thakur, <bits.kunals...@gmail.com>
wrote:

> where i can define servicename in last condition
>
> On Thursday, September 27, 2018 at 7:31:02 PM UTC+5:30, Brian Coca wrote:
>>
>> You are not using |default correctly, the split needs a defined
>> variable to work on:
>>
>>  with_items: {{ (servicename|default('')).split(',') }}
>>
>> That still creates a list with single blank item so you might want to
>> add a defined check
>>
>> with_items: "{{ (notdefined is
>> defined)|ternary((notdefined|default('')).split(','),[]) }}"
>>
>> --
>> ----------
>> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f91c31a2-d791-4206-9414-766d7aede3a8%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f91c31a2-d791-4206-9414-766d7aede3a8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CANErU6%3Ds8jjU62uid2Tvhz8F9QxVLVqRKrJX_39C8WZwr8Tb3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to