From e9a74aadee25e0f55dc70b44f0488489c531503d Mon Sep 17 00:00:00 2001 From: alecsandru Date: Fri, 3 May 2024 17:08:13 +0000 Subject: [PATCH] Update 'haproxy.yml' --- haproxy.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/haproxy.yml b/haproxy.yml index 17af1b7..ab045ad 100644 --- a/haproxy.yml +++ b/haproxy.yml @@ -20,6 +20,14 @@ package: name: fence-agents state: present + - name: append hosts to etc_hosts + blockinfile: + state: present + dest: /etc/hosts + content: | + {% for host in groups.all %} + {{ host }} {{ hostvars\[host\]\['hostname'\] }} + {% endfor %} - name: Start pcsd service: name: pscd @@ -34,11 +42,3 @@ name: haproxy enabled: true state: started - - name: append hosts to etc_hosts - blockinfile: - state: present - dest: /etc/hosts - content: | - {% for host in groups.all %} - {{ host }} {{ hostvars\[host\]\['hostname'\] }} - {% endfor %} \ No newline at end of file