Note
This module is part of the cisco.nxos collection (version 9.4.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install cisco.nxos.
To use it in a playbook, specify: cisco.nxos.nxos_ping.
New in cisco.nxos 1.0.0
Parameter | Comments |
|---|---|
count integer | Number of packets to send. Default: |
dest string / required | IP address or hostname (resolvable by switch) of remote node. |
df_bit boolean | Set the DF bit. Choices:
|
size integer | Size of packets to send. |
source string | Source IP Address or hostname (resolvable by switch) |
state string | Determines if the expected result is success or fail. Choices:
|
vrf string | Outgoing VRF. |
Note
- name: Test reachability to 8.8.8.8 using mgmt vrf
cisco.nxos.nxos_ping:
dest: 8.8.8.8
vrf: management
host: 68.170.147.165
- name: Test reachability to a few different public IPs using mgmt vrf
cisco.nxos.nxos_ping:
dest: "{{ item }}"
vrf: management
host: 68.170.147.165
with_items:
- 8.8.8.8
- 4.4.4.4
- 198.6.1.4
- name: Test reachability to 8.8.8.8 using mgmt vrf, size and df-bit
cisco.nxos.nxos_ping:
dest: 8.8.8.8
df_bit: true
size: 1400
vrf: management
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
commands list / elements=string | Show the command sent Returned: always Sample: |
packet_loss string | Percentage of packets lost Returned: always Sample: |
packets_rx integer | Packets successfully received Returned: always Sample: |
packets_tx integer | Packets successfully transmitted Returned: always Sample: |
rtt dictionary | Show RTT stats Returned: always Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/cisco/nxos/nxos_ping_module.html