diff --git a/ping.yml b/ping.yml index 82a5ccc..7c8c95f 100644 --- a/ping.yml +++ b/ping.yml @@ -4,7 +4,6 @@ become: false gather_facts: false - tasks: - name: Ping target hosts ansible.builtin.ping: @@ -13,16 +12,15 @@ failed_when: false - name: "Ping Check: Successful Hosts" - debug: + ansible.builtin.debug: var: ansible_play_batch - run_once: true + run_once: true # noqa: run-once[task] delegate_to: localhost - name: "Ping Check: Failed Hosts" - debug: + ansible.builtin.debug: msg: "{{ ansible_play_hosts_all | difference(ansible_play_batch) }}" run_once: true # noqa: run-once[task] delegate_to: localhost - ...