Simple ping test
This commit is contained in:
14
ping_test.yml
Normal file
14
ping_test.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
- name: Network Ping Test
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Ping the target 10 times
|
||||
ansible.builtin.command: "ping -c 10 8.8.8.8"
|
||||
register: ping_output
|
||||
ignore_errors: true
|
||||
|
||||
- name: Report the response
|
||||
ansible.builtin.debug:
|
||||
var: ping_output.stdout_lines
|
||||
Reference in New Issue
Block a user