-
Notifications
You must be signed in to change notification settings - Fork 2
/
icmp.yml
48 lines (41 loc) · 1.32 KB
/
icmp.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- name: ICMP connection between two droplets
hosts: client
vars:
debug: false
timeout: 3
count: 3
gather_facts: false
tasks:
- name: check the ICMP reachability (IPv4)
command: ping -c {{ count }} -W {{ timeout }} {{ server.ipv4 }}
register: result
changed_when: false
failed_when: result.rc == 0
ignore_errors: "{{ debug }}"
- name: print out the result
debug: var=result
- name: check the ICMP reachability (private IPv4)
command: ping -c {{ count }} -W {{ timeout }} {{ server.ipv4_private }}
register: result
changed_when: false
failed_when: result.rc == 0
ignore_errors: "{{ debug }}"
- name: print out the result
debug: var=result
- name: check the ICMP reachability (IPv6)
command: ping6 -c {{ count }} -W {{ timeout }} {{ server.ipv6 }}
register: result
changed_when: false
failed_when: result.rc == 0
ignore_errors: "{{ debug }}"
- name: print out the result
debug: var=result
- name: check the ICMP reachability (Floating IP)
command: ping -c {{ count }} -W {{ timeout }} {{ server.flip }}
register: result
changed_when: false
failed_when: result.rc == 0
ignore_errors: "{{ debug }}"
- name: print out the result
debug: var=result