That did the trick.!!!! 
Thank you so much!!!

El domingo, 17 de mayo de 2020, 19:04:48 (UTC-3), Vladimir Botka escribió:
>
> On Sun, 17 May 2020 13:57:57 -0700 (PDT) 
> Kernel Panic <[email protected] <javascript:>> wrote: 
>
> > List ... contains contains item1, item2, item3, item4, item5. I want to 
> > remove item1 and 2 (from myvar) 
> > 
> >   - set_fact: 
> >         list_of_items: "{{ list.stdout_lines| 
> >                            reject('search', item )| 
> >                            list  }}" 
> >       with_items: "{{ myvar }}" 
>
> Use filter "difference". For example 
>
>     - set_fact: 
>         list_of_items: "{{ list.stdout_lines|difference(my_var) }}" 
>
> HTH, 
>         -vlado 
>

-- 
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/e9e019d5-380c-4336-843d-cc7853937e41%40googlegroups.com.

Reply via email to