Advertisement
k3NGuru

Untitled

Nov 1st, 2022
1,150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.75 KB | None | 0 0
  1. ---
  2. - name: Проверка доступности хостов по порту
  3.   loop: "{{ kafka }}"
  4.   wait_for:
  5.     host: "{{ item }}"
  6.     port: 9092
  7.     state: started
  8.     delay: 0
  9.     timeout: 1
  10.  
  11. - name: check if 192.168.33.12:25 is accessible
  12.   wait_for:
  13.     host: 192.168.33.12
  14.     port: 25
  15.     state: started
  16.     delay: 0
  17.     timeout: 1
  18.     search_regex: Postfix
  19.  
  20. - name: Проверка доступности хостов
  21.   wait_for:
  22.     host: mywebserver.com
  23.     port: "{{ item }}"
  24.     state: started         # Port should be open
  25.     delay: 0               # No wait before first check (sec)
  26.     timeout: 3             # Stop checking after timeout (sec)
  27.   ignore_errors: yes
  28.   with_items:
  29.    - 443
  30.     - 80
  31.     - 80443
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement