Commit 9921f804 by Michael DeHaan

Merge pull request #6643 from herbygillot/fact-full-hostname

Add a fact providing the full hostname, without the domain portion
parents 9870784d 94297950
......@@ -108,6 +108,7 @@ class Facts(object):
self.facts['python_version'] = platform.python_version()
self.facts['fqdn'] = socket.getfqdn()
self.facts['hostname'] = platform.node().split('.')[0]
self.facts['nodename'] = platform.node()
self.facts['domain'] = '.'.join(self.facts['fqdn'].split('.')[1:])
arch_bits = platform.architecture()[0]
self.facts['userspace_bits'] = arch_bits.replace('bit', '')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment