diff --git a/ansible/roles/haproxy/templates/haproxy.json.j2 b/ansible/roles/haproxy/templates/haproxy.json.j2 index 9e0d2808f8..31ed4c5972 100644 --- a/ansible/roles/haproxy/templates/haproxy.json.j2 +++ b/ansible/roles/haproxy/templates/haproxy.json.j2 @@ -1,5 +1,6 @@ +{% set haproxy_cmd='/usr/sbin/haproxy -W -db' if kolla_base_distro in ['ubuntu'] else '/usr/sbin/haproxy-systemd-wrapper' %} { - "command": "/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid", + "command": "{{ haproxy_cmd }} -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid", "config_files": [ { "source": "{{ container_config_directory }}/haproxy.cfg",