summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-01-25 08:55:29 -0500
committerGitHub <noreply@github.com>2017-01-25 08:55:29 -0500
commitbe03ab79b888cd229aa41d7cb3aaf5646c267d80 (patch)
tree42dc08ecd94948ae0fa7e3d9e71768bd7cd456d7
parent223f3e1d99470c53dc5fdc92702bb1c17d18837a (diff)
parent151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5 (diff)
downloadopenshift-be03ab79b888cd229aa41d7cb3aaf5646c267d80.tar.gz
openshift-be03ab79b888cd229aa41d7cb3aaf5646c267d80.tar.bz2
openshift-be03ab79b888cd229aa41d7cb3aaf5646c267d80.tar.xz
openshift-be03ab79b888cd229aa41d7cb3aaf5646c267d80.zip
Merge pull request #3172 from detiber/gceNodeName
override nodename for gce with cloudprovider
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index c99452062..f7506bd63 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1032,6 +1032,8 @@ def set_nodename(facts):
if 'node' in facts and 'common' in facts:
if 'cloudprovider' in facts and facts['cloudprovider']['kind'] == 'openstack':
facts['node']['nodename'] = facts['provider']['metadata']['hostname'].replace('.novalocal', '')
+ elif 'cloudprovider' in facts and facts['cloudprovider']['kind'] == 'gce':
+ facts['node']['nodename'] = '.'.split(facts['provider']['metadata']['hostname'])[0]
else:
facts['node']['nodename'] = facts['common']['hostname'].lower()
return facts