The Ansible module index has been consulted, but no module was found that checks whether a port is available? Is there a module that supports this?
What does available
mean?
Available means that a port, e.g. 80
is not in LISTEN state. The following indicates that port 111 is unavailable.
user@localhost ~ $ ss -nat
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:111 *:*
What is the aim of this question?
The aim of this question is to find a way to stop an Ansible run when port 80 is already allocated by another process than certbot. Certbot requires port 80 to be available, otherwise the cert cannot be renewed. The issue can be found here.