summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2017-01-24 21:15:25 -0500
committerJason DeTiberus <jdetiber@redhat.com>2017-01-24 21:15:54 -0500
commit151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5 (patch)
tree86036e59aa3c664bfdcb0d1ba5563b283d82e930 /roles/openshift_facts
parent60808d88521ada44948632825cadb7e9752c6d97 (diff)
downloadopenshift-151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5.tar.gz
openshift-151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5.tar.bz2
openshift-151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5.tar.xz
openshift-151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5.zip
override nodename for gce with cloudprovider
Diffstat (limited to 'roles/openshift_facts')
-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