Note
This plugin is part of the community.network collection.
To install it use: ansible-galaxy collection install community.network.
To use it in a playbook, specify: community.network.icx_ping.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| count integer | Number of packets to send. Default is 1. | |
| dest string / required | ip-addr | host-name | vrf vrf-name | ipv6 [ ipv6-addr | host-name | vrf vrf-name] (resolvable by switch) of the remote node. | |
| size integer | Specifies the size of the ICMP data portion of the packet, in bytes. This is the payload and does not include the header. The value can range from 0 to 10000. The default is 16.. | |
| source string | IP address to be used as the origin of the ping packets. | |
| state string |
| Determines if the expected result is success or fail. |
| timeout integer | Specifies the time, in milliseconds for which the device waits for a reply from the pinged device. The value can range from 1 to 4294967296. The default is 5000 (5 seconds). | |
| ttl integer | Specifies the time to live as a maximum number of hops. The value can range from 1 to 255. The default is 64. | |
| vrf string | Specifies the Virtual Routing and Forwarding (VRF) instance of the device to be pinged. |
Note
- name: Test reachability to 10.10.10.10
community.network.icx_ping:
dest: 10.10.10.10
- name: Test reachability to ipv6 address from source with timeout
community.network.icx_ping:
dest: ipv6 2001:cdba:0000:0000:0000:0000:3257:9652
source: 10.1.1.1
timeout: 100000
- name: Test reachability to 10.1.1.1 through vrf using 5 packets
community.network.icx_ping:
dest: 10.1.1.1
vrf: x.x.x.x
count: 5
- name: Test unreachability to 10.30.30.30
community.network.icx_ping:
dest: 10.40.40.40
state: absent
- name: Test reachability to ipv4 with ttl and packet size
community.network.icx_ping:
dest: 10.10.10.10
ttl: 20
size: 500
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description |
|---|---|---|
| commands list / elements=string | always | Show the command sent. Sample: ['ping 10.40.40.40 count 20 source loopback0', 'ping 10.40.40.40'] |
| packet_loss string | always | Percentage of packets lost. Sample: 0% |
| packets_rx integer | always | Packets successfully received. Sample: 20 |
| packets_tx integer | always | Packets successfully transmitted. Sample: 20 |
| rtt dictionary | always | Show RTT stats. Sample: {'avg': 2, 'max': 8, 'min': 1} |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/network/icx_ping_module.html