From 7f077613d711825480cb18e12dfde72ac81e1102 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Thu, 28 Mar 2024 22:57:56 -0400 Subject: [PATCH] fixes --- ping.yml | 2 ++ templates/ping_results.j2 | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 templates/ping_results.j2 diff --git a/ping.yml b/ping.yml index eb2b9c1..68cbc56 100644 --- a/ping.yml +++ b/ping.yml @@ -30,6 +30,8 @@ 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: diff --git a/templates/ping_results.j2 b/templates/ping_results.j2 deleted file mode 100644 index 5c6e422..0000000 --- a/templates/ping_results.j2 +++ /dev/null @@ -1,9 +0,0 @@ -success_hosts: -{% for shost in ansible_play_batch %} - - "{{ shost }}" -{% endfor %} - -failed_hosts: -{% for fhost in ansible_play_hosts_all | difference(ansible_play_batch) %} - - "{{ fhost }}" -{% endfor %}