summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-02-12 10:27:03 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2016-02-12 10:27:03 -0500
commit77ca4cdafdda5df48467b85d5ae1469c36d0fff4 (patch)
treef637720a0e8845ce1eef69b1f9a0d7e5e17b0f4c /roles/openshift_facts/library
parent2fd931794bf82cf3e11ad9267df9e0885dde7b1d (diff)
parent81345f2ee5365708a3895f182645c42f2ee0efac (diff)
downloadopenshift-77ca4cdafdda5df48467b85d5ae1469c36d0fff4.tar.gz
openshift-77ca4cdafdda5df48467b85d5ae1469c36d0fff4.tar.bz2
openshift-77ca4cdafdda5df48467b85d5ae1469c36d0fff4.tar.xz
openshift-77ca4cdafdda5df48467b85d5ae1469c36d0fff4.zip
Merge pull request #1362 from detiber/fixLoopback
Fix loopback cluster name, context name, and user
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 20f6cc5c8..25b9534dd 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -508,10 +508,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:
@@ -719,9 +720,9 @@ def set_version_facts_if_unset(facts):
version_gte_3_1_1_or_1_1_1 = LooseVersion(version) >= LooseVersion('1.1.1')
version_gte_3_2_or_1_2 = LooseVersion(version) >= LooseVersion('1.1.2')
else:
- version_gte_3_1_or_1_1 = LooseVersion(version) >= LooseVersion('3.1.0')
+ version_gte_3_1_or_1_1 = LooseVersion(version) >= LooseVersion('3.0.2.905')
version_gte_3_1_1_or_1_1_1 = LooseVersion(version) >= LooseVersion('3.1.1')
- version_gte_3_2_or_1_2 = LooseVersion(version) >= LooseVersion('3.2.0')
+ version_gte_3_2_or_1_2 = LooseVersion(version) >= LooseVersion('3.1.1.901')
else:
version_gte_3_1_or_1_1 = True
version_gte_3_1_1_or_1_1_1 = True