@@ -21,15 +21,15 @@ defaults
21
21
22
22
listen stats
23
23
mode http
24
- bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:7000
24
+ bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:{{ haproxy_listen_port.stats }}
25
25
stats enable
26
26
stats uri /
27
27
28
28
listen master
29
29
{% if cluster_vip is defined and cluster_vip | length > 0 %}
30
- bind {{ cluster_vip }}:5000
30
+ bind {{ cluster_vip }}:{{ haproxy_listen_port.master }}
31
31
{% else %}
32
- bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:5000
32
+ bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:{{ haproxy_listen_port.master }}
33
33
{% endif %}
34
34
maxconn {{ haproxy_maxconn.master }}
35
35
option tcplog
@@ -49,9 +49,9 @@ server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['inventory_hos
49
49
50
50
listen replicas
51
51
{% if cluster_vip is defined and cluster_vip | length > 0 %}
52
- bind {{ cluster_vip }}:5001
52
+ bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas }}
53
53
{% else %}
54
- bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:5001
54
+ bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:{{ haproxy_listen_port.replicas }}
55
55
{% endif %}
56
56
maxconn {{ haproxy_maxconn.replica }}
57
57
option tcplog
@@ -72,9 +72,9 @@ server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['inventory_hos
72
72
73
73
listen replicas_sync
74
74
{% if cluster_vip is defined and cluster_vip | length > 0 %}
75
- bind {{ cluster_vip }}:5002
75
+ bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas_sync }}
76
76
{% else %}
77
- bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:5002
77
+ bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:{{ haproxy_listen_port.replicas_sync }}
78
78
{% endif %}
79
79
maxconn {{ haproxy_maxconn.replica }}
80
80
option tcplog
@@ -95,9 +95,9 @@ server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['inventory_hos
95
95
96
96
listen replicas_async
97
97
{% if cluster_vip is defined and cluster_vip | length > 0 %}
98
- bind {{ cluster_vip }}:5003
98
+ bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas_async }}
99
99
{% else %}
100
- bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:5003
100
+ bind {{ hostvars[inventory_hostname] ['inventory_hostname'] }}:{{ haproxy_listen_port.replicas_async }}
101
101
{% endif %}
102
102
maxconn {{ haproxy_maxconn.replica }}
103
103
option tcplog
0 commit comments