From 42dfc8eefd8c036f91b352eff98df714085d777e Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Mon, 30 Jan 2017 16:21:14 -0500 Subject: GCE deployment fails due to invalid lookup Data is only available under ['instance'] and split was in the wrong order. This deploys against GCE for me. --- roles/openshift_facts/library/openshift_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 3c8e2ab9c..0c7aad81e 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -1019,7 +1019,7 @@ def set_nodename(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] + facts['node']['nodename'] = facts['provider']['metadata']['instance']['hostname'].split('.')[0] else: facts['node']['nodename'] = facts['common']['hostname'].lower() return facts -- cgit v1.2.3