# Waiting for port after reboot

**URL:** <https://forum.ansible.com/t/waiting-for-port-after-reboot/19781>\
**Category:** Ansible Project\
**Created:** [November 17, 2015, 8:41am UTC](https://forum.ansible.com/t/waiting-for-port-after-reboot/19781 "2015-11-17T08:41:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Schmitt](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@Christian\_Schmitt](https://forum.ansible.com/u/Christian_Schmitt)\
**Post date:** [November 17, 2015, 8:41am UTC](https://forum.ansible.com/t/waiting-for-port-after-reboot/19781/1 "2015-11-17T08:41:26Z")

</div>

Hello, currently I try to wait for SSH on port 22 after reboot, however it will always fail with the following:

TASK: [upgrade | waiting for port after reboot] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

failed: [[ev01.envisia.de](http://ev01.envisia.de) → 127.0.0.1] =\> {“failed”: true, “parsed”: false}

[sudo via ansible, key=ruehgsdwzotpficlvwsncstkhoouefbn] password:

I have set this globally:

ansible\_ssh\_user: centos # ansible 2.0: ansible\_user

ansible\_sudo: yes # ansible 2.0: ansible\_become

ansible\_sudo\_user: root # ansible 2.0: ansible\_become\_user

This is my command:

- name: waiting for port after reboot

local\_action: wait\_for host={{ inventory\_hostname }} port={{ rolling\_reboot\_wait\_port }} delay={{ rolling\_reboot\_wait\_delay }} state=started

tags: reboot

How could I fix that.
