@@ -21,15 +21,15 @@ defaults
21
21
22
22
listen stats
23
23
mode http
24
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.stats }}
24
+ bind {{ 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
30
bind {{ cluster_vip }}:{{ haproxy_listen_port.master }}
31
31
{% else %}
32
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.master }}
32
+ bind {{ inventory_hostname }}:{{ haproxy_listen_port.master }}
33
33
{% endif %}
34
34
maxconn {{ haproxy_maxconn.master }}
35
35
option tcplog
@@ -50,7 +50,7 @@ listen master_direct
50
50
{% if cluster_vip is defined and cluster_vip | length > 0 %}
51
51
bind {{ cluster_vip }}:{{ haproxy_listen_port.master_direct }}
52
52
{% else %}
53
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.master_direct }}
53
+ bind {{ inventory_hostname }}:{{ haproxy_listen_port.master_direct }}
54
54
{% endif %}
55
55
maxconn {{ haproxy_maxconn.master }}
56
56
option tcplog
@@ -65,7 +65,7 @@ listen replicas
65
65
{% if cluster_vip is defined and cluster_vip | length > 0 %}
66
66
bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas }}
67
67
{% else %}
68
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.replicas }}
68
+ bind {{ inventory_hostname }}:{{ haproxy_listen_port.replicas }}
69
69
{% endif %}
70
70
maxconn {{ haproxy_maxconn.replica }}
71
71
option tcplog
@@ -87,7 +87,7 @@ listen replicas_direct
87
87
{% if cluster_vip is defined and cluster_vip | length > 0 %}
88
88
bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas_direct }}
89
89
{% else %}
90
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.replicas_direct }}
90
+ bind {{ inventory_hostname }}:{{ haproxy_listen_port.replicas_direct }}
91
91
{% endif %}
92
92
maxconn {{ haproxy_maxconn.replica }}
93
93
option tcplog
@@ -103,7 +103,7 @@ listen replicas_sync
103
103
{% if cluster_vip is defined and cluster_vip | length > 0 %}
104
104
bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas_sync }}
105
105
{% else %}
106
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.replicas_sync }}
106
+ bind {{ inventory_hostname }}:{{ haproxy_listen_port.replicas_sync }}
107
107
{% endif %}
108
108
maxconn {{ haproxy_maxconn.replica }}
109
109
option tcplog
@@ -125,7 +125,7 @@ listen replicas_sync_direct
125
125
{% if cluster_vip is defined and cluster_vip | length > 0 %}
126
126
bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas_sync_direct }}
127
127
{% else %}
128
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.replicas_sync_direct }}
128
+ bind {{ inventory_hostname }}:{{ haproxy_listen_port.replicas_sync_direct }}
129
129
{% endif %}
130
130
maxconn {{ haproxy_maxconn.replica }}
131
131
option tcplog
@@ -141,7 +141,7 @@ listen replicas_async
141
141
{% if cluster_vip is defined and cluster_vip | length > 0 %}
142
142
bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas_async }}
143
143
{% else %}
144
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.replicas_async }}
144
+ bind {{ inventory_hostname }}:{{ haproxy_listen_port.replicas_async }}
145
145
{% endif %}
146
146
maxconn {{ haproxy_maxconn.replica }}
147
147
option tcplog
@@ -163,7 +163,7 @@ listen replicas_async_direct
163
163
{% if cluster_vip is defined and cluster_vip | length > 0 %}
164
164
bind {{ cluster_vip }}:{{ haproxy_listen_port.replicas_async_direct }}
165
165
{% else %}
166
- bind {{ hostvars[ inventory_hostname] ['inventory_hostname '] }}:{{ haproxy_listen_port.replicas_async_direct }}
166
+ bind {{ inventory_hostname }}:{{ haproxy_listen_port.replicas_async_direct }}
167
167
{% endif %}
168
168
maxconn {{ haproxy_maxconn.replica }}
169
169
option tcplog
0 commit comments