more optimization
This commit is contained in:
parent
dcec78e661
commit
63aad04c3a
19
ping.yml
19
ping.yml
@ -20,16 +20,17 @@
|
||||
- name: Clear host errors
|
||||
ansible.builtin.meta: clear_host_errors
|
||||
|
||||
- name: Successful Hosts
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ successful_hosts | default([]) + ansible_play_batch }}"
|
||||
- name: Display ping results
|
||||
run_once: true # noqa: run-once[task]
|
||||
delegate_to: localhost
|
||||
block:
|
||||
- name: Successful Hosts
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ successful_hosts | default([]) + ansible_play_batch }}"
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Failed Hosts
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ failed_hosts | default([]) + ansible_play_hosts_all | difference(ansible_play_batch) }}"
|
||||
run_once: true # noqa: run-once[task]
|
||||
delegate_to: localhost
|
||||
- name: Failed Hosts
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ failed_hosts | default([]) + ansible_play_hosts_all | difference(ansible_play_batch) }}"
|
||||
delegate_to: localhost
|
||||
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user