From dcec78e661227018036c6a29a25f9155bcfaf575 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Fri, 29 Mar 2024 00:02:41 -0400 Subject: [PATCH] optimization --- ping.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ping.yml b/ping.yml index 969e6fc..7401a47 100644 --- a/ping.yml +++ b/ping.yml @@ -20,22 +20,15 @@ - name: Clear host errors ansible.builtin.meta: clear_host_errors - - name: Set facts - ansible.builtin.set_fact: - successful_hosts: "{{ successful_hosts | default([]) + ansible_play_batch }}" - failed_hosts: "{{ failed_hosts | default([]) + ansible_play_hosts_all | difference(ansible_play_batch) }}" - run_once: true # noqa: run-once[task] - delegate_to: localhost - - name: Successful Hosts ansible.builtin.debug: - var: successful_hosts + msg: "{{ successful_hosts | default([]) + ansible_play_batch }}" run_once: true # noqa: run-once[task] delegate_to: localhost - name: Failed Hosts ansible.builtin.debug: - var: failed_hosts + msg: "{{ failed_hosts | default([]) + ansible_play_hosts_all | difference(ansible_play_batch) }}" run_once: true # noqa: run-once[task] delegate_to: localhost