The code is open source. You can read the ansible modules on GitHub.

https://github.com/ansible/ansible/blob/stable-2.14/lib/ansible/modules/wait_for.py


Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

On Mar 1, 2023, at 2:00 PM, 'Leandro Montesoro' via Ansible Project 
<[email protected]> wrote:

Hi !

i'm making a playbook like this:

- name: Check all port numbers are accessible from current host
wait_for:
host: "{{ item[0] }}"
port: "{{ item[1] }}"
state: started
delay: 0
timeout: 3
delegate_to: localhost
become: false
ignore_errors: no
ignore_unreachable: yes
register: result
failed_when: not result.failed
with_nested:
- "{{ ansible_default_ipv4.address }}"
- [443,80,9200,9300,22,5432,6432]





The result informs that 1 of my ports in public ip it's open, i'll check in my 
host and its true, but it has an rule to drop all the trafic over port 22. 
Beyond it, the playbook informs ok, but when i'll try to scan this por with 
nmap or telnet the result its the port its close. My question is ¿what is the 
method used for 'wait_for' to check the ports?

thanks a lot  !

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fddf8ea4-6948-431b-8dfb-467c04c4d0e9n%40googlegroups.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2Ffddf8ea4-6948-431b-8dfb-467c04c4d0e9n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7C854fe424011d4d51218508db1a874ecc%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638132940661307775%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nzhEWkTNMNHAHXAP%2FR3Wnen8XXpA4qwG5gF2YvYjWRg%3D&reserved=0>.

-- 
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/7E7C8B39-6E3E-4D35-A89D-F79173E51283%40nist.gov.

Reply via email to