E
Size: a a a
VZ
M
NT
VZ
---
- name: The open port checker
hosts: all
become: yes
vars:
check_port: 80
check_hosts:
- ya.ru
- mail.ru
tasks:
- name: "Test Network Connection to {{ check_hosts }} port {{ check_port }} "
wait_for:
host: "{{ item }}"
port: "{{ check_port }}"
state: started # Port should be open
delay: 0 # No wait before first check (sec)
timeout: 5 # Stop checking after timeout (sec)
ignore_errors: yes
check_mode: no
loop: "{{ check_hosts }}"
VZ
VZ
M
VZ
VZ