diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml index 45b1cfd2d..d41f016d5 100644 --- a/roles/haproxy/tasks/main.yml +++ b/roles/haproxy/tasks/main.yml @@ -1,5 +1,12 @@ --- +- name: Gather facts for hosts postres_cluster + ansible.builtin.setup: + delegate_to: "{{ item }}" + delegate_facts: true + loop: "{{ groups['postgres_cluster'] }}" + when: hostvars[groups['postgres_cluster'][0]].ansible_hostname is not defined + # Install HAProxy from rpm/deb packages # from repo - block: