On Wed, May 20, 2015 at 3:19 PM Javeria Khan <javeria...@gmail.com> wrote:

>
> Also, another quick question. If I was using my_dict in a task loop, could
> i put a condition on:
>
>
Right that is my example. Here it is in code when item_en is false the item
is skipped.

TASK: [Loop]
******************************************************************
changed: [127.0.0.1] => (item={'key': 'value1', 'type': 'type1', 'name':
'name1', 'item_en': True})
skipping: [127.0.0.1] => (item={'key': 'value2', 'type': 'type2', 'name':
'name2', 'item_en': False})
changed: [127.0.0.1] => (item={'key': 'value3', 'type': 'type3', 'name':
'name3', 'item_en': True})

https://gist.github.com/shawnferry/572c4f733a3f06f86a37



> with_items: my_dict
> when: item.key is defined
>
>
> will that work?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/VerPXFuLUb0/unsubscribe.
> To unsubscribe from this group and all its topics, 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/6f3689d8-51e5-4fdb-ac81-2b7f43b81ccb%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/6f3689d8-51e5-4fdb-ac81-2b7f43b81ccb%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/CAMtfUkYug%3DXre74pf8C90Weup99TrmfgT1WoRbYAhY%3DYksJLRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to