From 8a99e206d409157d037dc30256ff8fe7f57b8bb5 Mon Sep 17 00:00:00 2001 From: Aidaho Date: Fri, 13 Dec 2024 12:44:53 +0300 Subject: [PATCH] v8.1.3: Update haproxy.service template for distribution version logic Adjusted the condition to apply "EXTRAOPTS" only for version 7 of the distribution. This ensures compatibility and prevents unintended configuration for other versions. --- app/scripts/ansible/roles/haproxy/templates/haproxy.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/ansible/roles/haproxy/templates/haproxy.service.j2 b/app/scripts/ansible/roles/haproxy/templates/haproxy.service.j2 index ba0d927f..3d78d137 100644 --- a/app/scripts/ansible/roles/haproxy/templates/haproxy.service.j2 +++ b/app/scripts/ansible/roles/haproxy/templates/haproxy.service.j2 @@ -5,7 +5,7 @@ After=network.target [Service] EnvironmentFile=-/etc/default/haproxy EnvironmentFile=-/etc/sysconfig/haproxy -Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" {% if ansible_facts['distribution_major_version'] != '8' %}"EXTRAOPTS=-S /run/haproxy-master.sock"{% endif %} +Environment="CONFIG=/etc/haproxy/haproxy.cfg" "PIDFILE=/run/haproxy.pid" {% if ansible_facts['distribution_major_version'] == '7' %}"EXTRAOPTS=-S /run/haproxy-master.sock"{% endif %} ExecStartPre=/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS ExecStart=/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS