Waiting for port after reboot

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 → 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.