Merge pull request #6643 from herbygillot/fact-full-hostname
Add a fact providing the full hostname, without the domain portion
This commit is contained in:
commit
9921f804f9
1 changed files with 1 additions and 0 deletions
|
@ -108,6 +108,7 @@ class Facts(object):
|
||||||
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().split('.')[0]
|
self.facts['hostname'] = platform.node().split('.')[0]
|
||||||
|
self.facts['nodename'] = platform.node()
|
||||||
self.facts['domain'] = '.'.join(self.facts['fqdn'].split('.')[1:])
|
self.facts['domain'] = '.'.join(self.facts['fqdn'].split('.')[1:])
|
||||||
arch_bits = platform.architecture()[0]
|
arch_bits = platform.architecture()[0]
|
||||||
self.facts['userspace_bits'] = arch_bits.replace('bit', '')
|
self.facts['userspace_bits'] = arch_bits.replace('bit', '')
|
||||||
|
|
Loading…
Reference in a new issue