From f64e4719f3409b390a167f8abdf687865b6d8fd2 Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Thu, 12 Apr 2018 11:19:14 +0200 Subject: [PATCH] Use external IP for public interfaces If available, we should be using the external_ip for the public hostname and public ip variables. This way, the webconsole and other APIs will be made available through the external network rather than just using the internal, non public, one Change-Id: I1d17ea8f9a14736593df56d288eb0147a58bb957 --- extraconfig/services/openshift-master.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extraconfig/services/openshift-master.yaml b/extraconfig/services/openshift-master.yaml index deefa627f1..4117c69abd 100644 --- a/extraconfig/services/openshift-master.yaml +++ b/extraconfig/services/openshift-master.yaml @@ -96,9 +96,9 @@ outputs: ansible_become: true etcd_ip: {{hostvars.raw_get(host)['ctlplane_ip']}} openshift_ip: {{hostvars.raw_get(host)['ctlplane_ip']}} - openshift_public_ip: {{hostvars.raw_get(host)['ctlplane_ip']}} + openshift_public_ip: {{hostvars.raw_get(host)['external_ip'] | default(hostvars.raw_get(host)['ctlplane_ip'])}} openshift_hostname: {{hostvars.raw_get(host)['ctlplane_ip']}} - openshift_public_hostname: {{hostvars.raw_get(host)['ctlplane_ip']}} + openshift_public_hostname: {{hostvars.raw_get(host)['external_ip'] | default(hostvars.raw_get(host)['ctlplane_ip'])}} {% if openshift_master_node_vars -%} {{openshift_master_node_vars | to_nice_yaml() | indent(6)}} {%- endif %}