No, since host is server2 the wait_for module will run on that host.
You would need connection: local, delegate_to: localhost or hosts: localhost to make it run on Ansible server aka Ansible controller.
No, since host is server2 the wait_for module will run on that host.
You would need connection: local, delegate_to: localhost or hosts: localhost to make it run on Ansible server aka Ansible controller.