mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add a fact providing the full hostname, without the domain portion
truncated.
This commit is contained in:
parent
7a53862046
commit
c0886a5f3a
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['fqdn'] = socket.getfqdn()
|
||||
self.facts['hostname'] = platform.node().split('.')[0]
|
||||
self.facts['full_hostname'] = platform.node()
|
||||
self.facts['domain'] = '.'.join(self.facts['fqdn'].split('.')[1:])
|
||||
arch_bits = platform.architecture()[0]
|
||||
self.facts['userspace_bits'] = arch_bits.replace('bit', '')
|
||||
|
|
Loading…
Reference in a new issue