changes
This commit is contained in:
parent
37001be118
commit
20758ab528
15
ping.yml
15
ping.yml
@ -7,17 +7,20 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Ping target hosts
|
- name: Ping target hosts
|
||||||
ansible.builtin.ping:
|
ansible.builtin.ping:
|
||||||
register: ping_results
|
register: ping_check
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: Display ping check results
|
- name: Set ping check results
|
||||||
ansible.builtin.debug:
|
ansible.builtin.set_fact:
|
||||||
msg: "{{ lookup('template', 'ping_results.j2') | from_yaml }}"
|
ping_results: "{{ lookup('template', 'ping_results.j2') | from_yaml }}"
|
||||||
run_once: true # noqa: run-once[task]
|
run_once: true # noqa: run-once[task]
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Clear host error
|
- name: Display ping check results
|
||||||
ansible.builtin.meta: clear_host_errors
|
ansible.builtin.debug:
|
||||||
|
var: ping_results
|
||||||
|
run_once: true # noqa: run-once[task]
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
...
|
...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user