diff --git a/templates/etc/haproxy/haproxy-backend.cfg.j2 b/templates/etc/haproxy/haproxy-backend.cfg.j2 index cb700f7..d0c5fa2 100644 --- a/templates/etc/haproxy/haproxy-backend.cfg.j2 +++ b/templates/etc/haproxy/haproxy-backend.cfg.j2 @@ -115,9 +115,11 @@ backend {{ name }} server-template {{ srv_tmpl }} {% endfor %} {% endif %} - {% for srv in value.servers %} + {% if value.servers is defined %} + {% for srv in value.servers %} server {{ srv }} - {% endfor %} + {% endfor %} + {% endif %} {% endfor %} {% endfor %}