# while / until feature request

**URL:** <https://forum.ansible.com/t/while-until-feature-request/12389>\
**Category:** Ansible Project\
**Created:** [February 20, 2013, 6:10am UTC](https://forum.ansible.com/t/while-until-feature-request/12389 "2013-02-20T06:10:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Martin](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@James\_Martin](https://forum.ansible.com/u/James_Martin)\
**Post date:** [February 20, 2013, 6:10am UTC](https://forum.ansible.com/t/while-until-feature-request/12389/1 "2013-02-20T06:10:34Z")

</div>

And if there's a better way around it other than a feature request,  
I'm very willing to do so:

Having a while / until option for the command and shell tasks.

Some times you want to keep running a command until it returns true,  
or contains some sort of output. Let's say you wanted to keep  
checking /tmp until a file showed up:

something like:

command: ls -1 /tmp|grep myfile  
until: true  
interval: 5  
retries: 100

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [February 20, 2013, 12:59pm UTC](https://forum.ansible.com/t/while-until-feature-request/12389/2 "2013-02-20T12:59:55Z")

</div>

Yep...

We already have a ticket on this one, making a note to merge your  
comments into that one so we have them all in one place...
