From 87547e56392eb1a48f09a62ff71f47c5bae515f0 Mon Sep 17 00:00:00 2001
From: David Mehren <david.mehren@tu-dortmund.de>
Date: Sun, 29 Nov 2020 15:22:52 +0100
Subject: [PATCH] Always gather facts about the database host

This allows standalone runs
---
 tasks/main.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tasks/main.yml b/tasks/main.yml
index eace13a..a070c62 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,4 +1,10 @@
 ---
+- name: Gather facts about db host
+  gather_facts:
+  delegate_to: "{{ keycloak_pgdb_host }}"
+  delegate_facts: True
+  when: "'ansible_default_ipv4' not in hostvars[keycloak_pgdb_host]"
+
 - name: Import Azul public key (for Zulu JRE)
   apt_key:
     id: B1998361219BD9C9
-- 
GitLab