Browse Source

Fix loopback cluster name, context name, and user

Jason DeTiberus 9 years ago
parent
commit
047c771ad8
1 changed files with 3 additions and 2 deletions
  1. 3 2
      roles/openshift_facts/library/openshift_facts.py

+ 3 - 2
roles/openshift_facts/library/openshift_facts.py

@@ -525,10 +525,11 @@ def set_url_facts_if_unset(facts):
                                                                    ports[prefix]))
 
 
-        r_lhn = "{0}:{1}".format(api_hostname, ports['api']).replace('.', '-')
+        r_lhn = "{0}:{1}".format(hostname, ports['api']).replace('.', '-')
+        r_lhu = "system:openshift-master/{0}:{1}".format(api_hostname, ports['api']).replace('.', '-')
         facts['master'].setdefault('loopback_cluster_name', r_lhn)
         facts['master'].setdefault('loopback_context_name', "default/{0}/system:openshift-master".format(r_lhn))
-        facts['master'].setdefault('loopback_user', "system:openshift-master/{0}".format(r_lhn))
+        facts['master'].setdefault('loopback_user', r_lhu)
 
         prefix_hosts = [('console', api_hostname), ('public_console', api_public_hostname)]
         for prefix, host in prefix_hosts: