diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2017-01-24 21:15:25 -0500 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2017-01-24 21:15:54 -0500 |
commit | 151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5 (patch) | |
tree | 86036e59aa3c664bfdcb0d1ba5563b283d82e930 /roles | |
parent | 60808d88521ada44948632825cadb7e9752c6d97 (diff) | |
download | openshift-151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5.tar.gz openshift-151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5.tar.bz2 openshift-151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5.tar.xz openshift-151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5.zip |
override nodename for gce with cloudprovider
Diffstat (limited to 'roles')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 2 |
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 |