ansible.netcommon.net_ping – Tests reachability using ping from a network device¶
Note
This plugin is part of the ansible.netcommon collection (version 1.5.0).
To install it use: ansible-galaxy collection install ansible.netcommon
.
To use it in a playbook, specify: ansible.netcommon.net_ping
.
New in version 1.0.0: of ansible.netcommon
Synopsis¶
Tests reachability using ping from network device to a remote destination.
For Windows targets, use the ansible.windows.win_ping module instead.
For targets running Python, use the ansible.builtin.ping module instead.
Note
This module has a corresponding action plugin.
Parameters¶
Notes¶
Note
For Windows targets, use the ansible.windows.win_ping module instead.
For targets running Python, use the ansible.builtin.ping module instead.
This module is supported on
ansible_network_os
network platforms. See the Network Platform Options for details.
Examples¶
- name: Test reachability to 10.10.10.10 using default vrf
ansible.netcommon.net_ping:
dest: 10.10.10.10
- name: Test reachability to 10.20.20.20 using prod vrf
ansible.netcommon.net_ping:
dest: 10.20.20.20
vrf: prod
- name: Test unreachability to 10.30.30.30 using default vrf
ansible.netcommon.net_ping:
dest: 10.30.30.30
state: absent
- name: Test reachability to 10.40.40.40 using prod vrf and setting count and source
ansible.netcommon.net_ping:
dest: 10.40.40.40
source: loopback0
vrf: prod
count: 20
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Jacob McGill (@jmcgill298)