# Why doesn't this task to check when a server has booted work?

**URL:** <https://forum.ansible.com/t/why-doesnt-this-task-to-check-when-a-server-has-booted-work/31928>\
**Category:** Ansible Project\
**Created:** [January 7, 2020, 9:55pm UTC](https://forum.ansible.com/t/why-doesnt-this-task-to-check-when-a-server-has-booted-work/31928 "2020-01-07T21:55:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobertF](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@RobertF](https://forum.ansible.com/u/RobertF)\
**Post date:** [January 7, 2020, 9:55pm UTC](https://forum.ansible.com/t/why-doesnt-this-task-to-check-when-a-server-has-booted-work/31928/1 "2020-01-07T21:55:55Z")

</div>

I have an Ansible playbook for creating [Linode](https://linode.com) servers. The problem I’m having is that my playbook isn’t able to determine when the new server is up. I’m using Ansible 2.8.4. My playbook is as follows:

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [January 7, 2020, 10:24pm UTC](https://forum.ansible.com/t/why-doesnt-this-task-to-check-when-a-server-has-booted-work/31928/2 "2020-01-07T22:24:04Z")

</div>

Hi,

You should probably use "wait\_for\_connection" module instead of the one you use

This is how I use it :

- hosts: newly\_managed\_vms  
become: yes  
become\_user: root  
remote\_user: ansible  
gather\_facts: no # servers could be not available yet  
tasks:

- name: "Wait for server to power up"  
wait\_for\_connection:  
sleep: 5  
timeout: 600

- name: "Gather facts for first time"  
setup:

Regards,

JYL

---

<div class="post-metadata">

**Author:** ![RobertF](https://avatars.discourse-cdn.com/v4/letter/r/a4c791/32.png) [@RobertF](https://forum.ansible.com/u/RobertF)\
**Post date:** [January 9, 2020, 12:10am UTC](https://forum.ansible.com/t/why-doesnt-this-task-to-check-when-a-server-has-booted-work/31928/3 "2020-01-09T00:10:17Z")

</div>

Thanks Jean-Yves!
