diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2
index 6215afd27a4edfb952a6586b7985b05472964bef..14a9d52185c4eab6d1b935dc7506c89ef98407fe 100644
--- a/ansible/roles/haproxy/templates/haproxy.cfg.j2
+++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2
@@ -1,3 +1,4 @@
+#jinja2: trim_blocks: False
 {% set tls_bind_info = 'ssl crt /etc/haproxy/haproxy.pem' if kolla_enable_tls_external | bool else '' %}
 global
   chroot /var/lib/haproxy