From bb4a212e6789eca2615f452f8c0e3980275c8b97 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 12 Mar 2021 21:53:50 +0200 Subject: [PATCH] Setup HAProxy after it's installed. --- roles/router/tasks/main.yaml | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/roles/router/tasks/main.yaml b/roles/router/tasks/main.yaml index 52c5e20..b45b6b0 100644 --- a/roles/router/tasks/main.yaml +++ b/roles/router/tasks/main.yaml @@ -135,30 +135,6 @@ - dns - network -- name: Configure HAProxy - copy: - backup: true - dest: /etc/haproxy/haproxy.cfg - mode: preserve - src: haproxy.cfg - validate: haproxy -c -f %s - notify: - - Restart HAProxy - tags: - - haproxy - - web - - network - -- name: Enable HAProxy - service: - enabled: true - name: haproxy - state: started - tags: - - haproxy - - web - - network - - name: Configure PF copy: dest: /etc/pf.conf @@ -323,6 +299,30 @@ - dhcp - network +- name: Configure HAProxy + copy: + backup: true + dest: /etc/haproxy/haproxy.cfg + mode: preserve + src: haproxy.cfg + validate: haproxy -c -f %s + notify: + - Restart HAProxy + tags: + - haproxy + - web + - network + +- name: Enable HAProxy + service: + enabled: true + name: haproxy + state: started + tags: + - haproxy + - web + - network + - name: Configure mail relaying lineinfile: line: action "outbound" relay host host01.shore.co.il -- GitLab