Allow to gracefully drain backends when disabled

This adds required parameters to the playbook to drain existing connections
towards backends instead of forcefully closing connections.

Change-Id: Iad35b654e0cec1b9e4083ef547822feecdf917b6
This commit is contained in:
Dmitriy Rabotyagov 2024-01-23 11:37:08 +01:00
parent a6fe4260a2
commit 9b50eb1088

View File

@ -34,4 +34,9 @@
host: "{{ item }}" host: "{{ item }}"
state: "{{ backend_state }}" state: "{{ backend_state }}"
socket: /var/run/haproxy.stat socket: /var/run/haproxy.stat
drain: "{{ haproxy_drain | default(False) }}"
shutdown_sessions: "False"
wait: "True"
wait_interval: "{{ haproxy_wait_interval | default(5) }}"
wait_retries: "{{ haproxy_wait_retries | default(24) }}"
with_items: "{{ backends.stdout_lines }}" with_items: "{{ backends.stdout_lines }}"