aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/ha/templates/haproxy.cfg')
-rw-r--r--deploy/adapters/ansible/roles/ha/templates/haproxy.cfg40
1 files changed, 20 insertions, 20 deletions
diff --git a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
index 4ed528ad..4b20db03 100644
--- a/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
+++ b/deploy/adapters/ansible/roles/ha/templates/haproxy.cfg
@@ -30,8 +30,8 @@ listen proxy-glance_registry_cluster
option tcpka
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:9191 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:9191 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-glance_api_cluster
@@ -40,8 +40,8 @@ listen proxy-glance_api_cluster
option httpchk
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:9292 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:9292 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-nova-novncproxy
@@ -49,8 +49,8 @@ listen proxy-nova-novncproxy
option tcpka
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:6080 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:6080 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-network
@@ -58,8 +58,8 @@ listen proxy-network
option tcpka
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:9696 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:9696 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-volume
@@ -68,8 +68,8 @@ listen proxy-volume
option httpchk
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:8776 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:8776 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-keystone_admin_cluster
@@ -78,8 +78,8 @@ listen proxy-keystone_admin_cluster
option httpchk
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:35357 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:35357 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-keystone_public_internal_cluster
@@ -88,8 +88,8 @@ listen proxy-keystone_public_internal_cluster
option httpchk
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:5000 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:5000 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-nova_compute_api_cluster
@@ -98,8 +98,8 @@ listen proxy-nova_compute_api_cluster
option httpchk
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:8774 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:8774 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-nova_metadata_api_cluster
@@ -107,8 +107,8 @@ listen proxy-nova_metadata_api_cluster
option tcpka
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:8775 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:8775 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen proxy-cinder_api_cluster
@@ -117,8 +117,8 @@ listen proxy-cinder_api_cluster
option httpchk
option tcplog
balance source
-{% for host in groups['controller'] %}
- server {{ host }} {{ hostvars[host]['ansible_' + INTERNAL_INTERFACE].ipv4.address }}:8776 weight 1 check inter 2000 rise 2 fall 5
+{% for host,ip in haproxy_hosts.items() %}
+ server {{ host }} {{ ip }}:8776 weight 1 check inter 2000 rise 2 fall 5
{% endfor %}
listen stats