# Ansible Do Until Loop

**URL:** <https://forum.ansible.com/t/ansible-do-until-loop/27589>\
**Category:** Ansible Project\
**Created:** [May 22, 2018, 8:20am UTC](https://forum.ansible.com/t/ansible-do-until-loop/27589 "2018-05-22T08:20:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madushan\_Chathuranga](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Madushan\_Chathuranga](https://forum.ansible.com/u/Madushan_Chathuranga)\
**Post date:** [May 22, 2018, 8:20am UTC](https://forum.ansible.com/t/ansible-do-until-loop/27589/1 "2018-05-22T08:20:44Z")

</div>

Hi All,

I’m using ansible version 2.5.0 I’m trying execute a task with an Do Until Loop.  
[http://docs.ansible.com/ansible/latest/user\_guide/playbooks\_loops.html#do-until-loops](http://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#do-until-loops)

Is it possible to run this task with an infinite number of retries ? with out defying the number of retries.  
e.g:

```auto
until: result.stdout.find("all systems go") != -1
delay: 10 

```

task will finish only when the condition is success not when number of retries exceeds.

Thanks.

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [May 22, 2018, 5:58pm UTC](https://forum.ansible.com/t/ansible-do-until-loop/27589/2 "2018-05-22T17:58:45Z")

</div>

Not to my knowledge, why don't you just set a high retry count?

With a delay 10 and retries 8640, that is 24 hours, and if you increase the delay to 20 it's 48 hours.
