Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Commit

Permalink
Modifies haproxy.cfg template to handle an empty web group more grace…
Browse files Browse the repository at this point in the history
…fully
  • Loading branch information
tima committed Oct 22, 2017
1 parent 439a0f7 commit ab39555
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ frontend web
backend web_backend
mode http
balance roundrobin
{% for host in groups['web'] %}
{% for host in groups['web']|default(()) %}
{% set ip_addr = hostvars[host]['ansible_all_ipv4_addresses'][haproxy_iface] %}
server {{ hostvars[host]['inventory_hostname'] }} {{ ip_addr }}:{{ haproxy_service_port }} weight 1 maxconn 12083 check
{% endfor %}

0 comments on commit ab39555

Please sign in to comment.