diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-01-25 08:55:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-25 08:55:29 -0500 |
commit | be03ab79b888cd229aa41d7cb3aaf5646c267d80 (patch) | |
tree | 42dc08ecd94948ae0fa7e3d9e71768bd7cd456d7 | |
parent | 223f3e1d99470c53dc5fdc92702bb1c17d18837a (diff) | |
parent | 151e25cc0ff12dd046efcdd61fa5a1ad21a96ac5 (diff) | |
download | openshift-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-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 |