HI,
I have a list of servers that only part of them are running port 9090.
I need to create two tasks, each should loop the server's hostnames. the
first task should define inside a register the first server hostname that
was found running port 9090 , the second task should define in a register
all server's hostnames that are running port 9090. If no server is running
port 9090 the tasks should fail
I have nc installed on the server and i thought about using a shell with
the command "nc -zv {{ item}} 9090
But I don't know how to filter the relevant answers
For example:
server1
server2
server3 running 9090
server4
server5 running 9090
- The first task should include in a register server 3 *or* server 5
hostname
- The second task should include in a register server 3 *and *server 5
hostname
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/f4bd3963-40da-47c2-8bbb-8bddffe84aa1n%40googlegroups.com.