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

On Sun, 4 Jun 2023 at 12:06, dulhaver via Ansible Project <
ansible-project@googlegroups.com> wrote:

> hi,
>
> 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?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/1926803861.486837.1685873199295%40office.mailbox.org
> <https://groups.google.com/d/msgid/ansible-project/1926803861.486837.1685873199295%40office.mailbox.org?utm_medium=email&utm_source=footer>
> .
>
-- 
Sent from Gmail Mobile

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAF8BbLbK_y%3DavxUo3WrVrqQtfz_-%3DFV5aGgZgFbHhjz1psaAAA%40mail.gmail.com.

Reply via email to