From 68b0c0851a58286127daccd6753d2e7b3cfa63bf Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 17 Apr 2024 11:57:16 +0100 Subject: [PATCH] deployment: Assert that there is only one HAProxy server Currently we are not deploying any failover mechanism such as keepalived, so limit to one HAProxy server. --- deployment/site.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deployment/site.yml b/deployment/site.yml index df41519..705d182 100644 --- a/deployment/site.yml +++ b/deployment/site.yml @@ -391,6 +391,13 @@ - haproxy become: true tasks: + # Currently we are not deploying any failover mechanism such as keepalived, + # so limit to one HAProxy server. + - name: Assert that there is only one HAProxy server + ansible.builtin.assert: + that: + groups['haproxy'] | length == 1 + - name: Ensure /etc/haproxy directory exists ansible.builtin.file: path: /etc/haproxy