diff --git a/roles/haproxy/templates/haproxy.cfg b/roles/haproxy/templates/haproxy.cfg index 3a8cf5ec09..9befc67a8c 100644 --- a/roles/haproxy/templates/haproxy.cfg +++ b/roles/haproxy/templates/haproxy.cfg @@ -32,7 +32,7 @@ backend stats-backend stats enable stats uri / -{% if env == "production" and 'rdu3' in inventory_hostname %} +{% if env == "production" and datacenter == 'rdu3' %} frontend ocp-masters-kapi mode tcp option tcplog @@ -62,7 +62,7 @@ backend ocp-masters-backend-machineconfig # server bootstrap.ocp.rdu3.fedoraproject.org bootstrap.ocp.rdu3.fedoraproject.org:22623 weight 1 maxconn 16384 check {% endif %} -{% if env != "production" and 'rdu3' in inventory_hostname %} +{% if env != "production" and datacenter == 'rdu3' %} frontend ocp-masters-kapi mode tcp option tcplog @@ -237,7 +237,7 @@ backend oci-candidate-registry-backend balance hdr(appserver) server oci-candidate-registry01 oci-candidate-registry01:5000 check inter 10s rise 1 fall 2 -{% if 'rdu3' in inventory_hostname %} +{% if datacenter == 'rdu3' %} # Only enable this on rdu3 proxies frontend src-frontend @@ -265,7 +265,7 @@ backend ipa01-backend server ipa01 ipa01:443 check inter 10s rise 1 fall 2 ssl verify required ca-file /etc/haproxy/ipa.pem option httpchk GET /ipa/ui/ -{% if env == "production" and 'rdu3' in inventory_hostname %} +{% if env == "production" and datacenter == 'rdu3' %} frontend kojipkgs-frontend bind 0.0.0.0:10062 default_backend kojipkgs-backend @@ -307,7 +307,7 @@ backend rabbitmq server rabbitmq03 rabbitmq03:5671 weight 1 maxconn 16384 {% endif %} -{% if 'rdu3' in inventory_hostname %} +{% if datacenter == "rdu3" %} frontend zabbix-frontend bind 0.0.0.0:10068 default_backend zabbix-backend