I am running a playbook og a couple of postgres-remotes who play different roles in a complex server landscape.
Now I want to check to check whether i.e. postgres1 has a connection via port 5432 to a specific IP address. The true/false like result of such a check should be saved into a variable.
Manually I could i.e. do this with something like ‘telnet <ip_address> 5432’
what would be the right approach (aka module) for such in an Ansible TASK?
Do you want to check if the server has an established connection to an IP address?
Or if it is listening on a specific port?
There are perhaps better ways of finding out if a server is running at some socket