diff options
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/DataSourceGCE.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceGCE.py b/cloudinit/sources/DataSourceGCE.py index 92e5a28e..f877b3d1 100644 --- a/cloudinit/sources/DataSourceGCE.py +++ b/cloudinit/sources/DataSourceGCE.py @@ -124,7 +124,8 @@ class DataSourceGCE(sources.DataSource): return self.metadata['public-keys'] def get_hostname(self, fqdn=False, _resolve_ip=False): - return self.metadata['local-hostname'] + # GCE has long FDQN's and has asked for short hostnames + return self.metadata['local-hostname'].split('.')[0] def get_userdata_raw(self): return self.metadata['user-data'] |