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 [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/f91c31a2-d791-4206-9414-766d7aede3a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to