haproxy-config: move firewalld reload handler to haproxy role

With the handler in the haproxy-config role, it gets triggered once for
every service that changes the firewall config. This happens because the
role is included dynamically. If we move the handler to the haproxy
role, which is only included once, the handler will trigger at most
once.

This is a follow up for Iea3680142711873984efff2b701347b6a56dd355.

Change-Id: Iad9ed241026435085bc9a0f5802818010b47830f
This commit is contained in:
Mark Goddard 2022-07-29 14:39:13 +01:00
parent ee3cb2ae02
commit 492bc7442f
2 changed files with 6 additions and 6 deletions
ansible/roles
haproxy-config/handlers
loadbalancer/handlers

@ -1,6 +0,0 @@
---
- name: Reload firewalld
become: True
service:
name: "firewalld"
state: reloaded

@ -1,4 +1,10 @@
---
- name: Reload firewalld
become: True
service:
name: "firewalld"
state: reloaded
# NOTE(yoctozepto): this handler dance is to ensure we delay restarting master
# keepalived and haproxy which control VIP address until we have working backups.
# This could be improved by checking if backup keepalived do not report FAULT state.