when: item.src not in my_list



On Tue, Jul 8, 2014 at 4:11 AM, Nico K. <nkrabsh...@gmail.com> wrote:

> Hi,
>
> Consider the following list of hashes being defined:
>
> my_list: [ { src: "a", dest: "b", mode: 755 }
>              , { src: "d", dest: "e", mode: 640 }
>              ]
>
> and this task:
>
> - name: example
>   file:
>     path: "{{ item }}"
>     state: absent
>   with_items: some_other_list
>   when: item not in my_list       # (.. how to match against 'src' ?? )
>
> The 'when:' clause in this specific case needs to look at 'src' from
> 'my_list', is there a way to define this?
>
> Thanks,
> Nico.
>
>
>  --
> 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/1ef29276-3e90-41b4-bc53-ddf0324881c4%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/1ef29276-3e90-41b4-bc53-ddf0324881c4%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/CA%2BnsWgx_uzn8X_EGxGPvFmewL1wrtm1qxgPvTneHP7zgzOU1tQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to