# Is there a way we can delay the connection instead of unreachable

**URL:** <https://forum.ansible.com/t/is-there-a-way-we-can-delay-the-connection-instead-of-unreachable/32603>\
**Category:** Ansible Project\
**Created:** [April 6, 2020, 5:09am UTC](https://forum.ansible.com/t/is-there-a-way-we-can-delay-the-connection-instead-of-unreachable/32603 "2020-04-06T05:09:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Work\_Email](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@Work\_Email](https://forum.ansible.com/u/Work_Email)\
**Post date:** [April 6, 2020, 5:09am UTC](https://forum.ansible.com/t/is-there-a-way-we-can-delay-the-connection-instead-of-unreachable/32603/1 "2020-04-06T05:09:22Z")

</div>

Hello,

ISSUE - Whenever a user in a company is not connected to the vpn; ansible fails the connection (as unreachable). Is there a way we can delay the connection for 20 days and have it keep trying every hour, instead of showing “unreachable”?

REASON- I need the output to look clean when I save the file in order to validate within the company.

I appreciate your help!

Thanks

---

<div class="post-metadata">

**Author:** ![hammou\_zligui](https://avatars.discourse-cdn.com/v4/letter/h/aca169/32.png) [@hammou\_zligui](https://forum.ansible.com/u/hammou_zligui)\
**Post date:** [April 7, 2020, 4:27pm UTC](https://forum.ansible.com/t/is-there-a-way-we-can-delay-the-connection-instead-of-unreachable/32603/2 "2020-04-07T16:27:07Z")

</div>

Yes;  
use pause module, as an example : playbook that create 10 VMs and inatll http on these 10 VMs, so before installing httpd i should wait for VMs to be up i use pause

exemple using pause module

-name: pause for 2 mins  
pause:  
minutes: 2

good lok

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [April 7, 2020, 8:07pm UTC](https://forum.ansible.com/t/is-there-a-way-we-can-delay-the-connection-instead-of-unreachable/32603/3 "2020-04-07T20:07:14Z")

</div>

This just sounds like a really bad idea! Having plays hanging around waiting for 20 days doesn’t sound sensible.  
Why not just fail controllably after a number of retries perhaps?

I use something like this to do this:  
…tasks…

register: output  
until: output is not failed  
retries: 3
