Since using platform.node, be sure to just return the hostname component.

reviewable/pr18780/r1
Michael DeHaan 12 years ago
parent f5e43d6a9a
commit b72dedc36e

@ -139,7 +139,7 @@ class Facts(object):
self.facts['machine'] = platform.machine() self.facts['machine'] = platform.machine()
self.facts['python_version'] = platform.python_version() self.facts['python_version'] = platform.python_version()
self.facts['fqdn'] = socket.getfqdn() self.facts['fqdn'] = socket.getfqdn()
self.facts['hostname'] = platform.node() self.facts['hostname'] = platform.node().split('.')[0]
self.facts['domain'] = '.'.join(self.facts['fqdn'].split('.')[1:]) self.facts['domain'] = '.'.join(self.facts['fqdn'].split('.')[1:])
if self.facts['machine'] == 'x86_64': if self.facts['machine'] == 'x86_64':
self.facts['architecture'] = self.facts['machine'] self.facts['architecture'] = self.facts['machine']

Loading…
Cancel
Save