On 11 December 2014 at 16:00, Michael DeHaan <mich...@ansible.com> wrote:

> "I would like to be able to exit a with_items loop based on the result of
> the previous iteration. Think of it as a generalisation of
> with_first_found. "
>
> Would like to step back to use cases first before we propose it be done
> with the "with_<foo>" here, as that's not how that part works.
>
> Curious what kinds of files you are downloading - for instance, package
> managers like yum already do this, etc.
>

In this particular instance, I am downloading tars of git repos.

See also the second use case, its a bit of an edge case but shows that a
general answer may be more useful than fixing a specific module. For
example the file download case could be solved by modifying they get_url
module to take a list of sources, but that only solves one specific case.
Add the functionality to core and it can be used with any module.

I'm also not sure a new with_ is needed, maybe access to another variable
within loop conditionals, or a new conditional such as break_when?

--
Hugh Saunders

-- 
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/CAAD%2BY3Vh7uwrAwTVVcDf-MkbciLOTn%3Dj-5WSbq9OQu%3D0puhR_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to