mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Change to socket.getfqdn() for fqdn fact
This commit is contained in:
parent
49c3ee9050
commit
7b41e22e56
1 changed files with 1 additions and 1 deletions
|
@ -224,7 +224,7 @@ def get_iface_hwaddr(iface):
|
||||||
return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1]
|
return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1]
|
||||||
|
|
||||||
def get_network_facts(facts):
|
def get_network_facts(facts):
|
||||||
facts['fqdn'] = socket.gethostname()
|
facts['fqdn'] = socket.getfqdn()
|
||||||
facts['hostname'] = facts['fqdn'].split('.')[0]
|
facts['hostname'] = facts['fqdn'].split('.')[0]
|
||||||
facts['interfaces'] = get_interfaces()
|
facts['interfaces'] = get_interfaces()
|
||||||
for iface in facts['interfaces']:
|
for iface in facts['interfaces']:
|
||||||
|
|
Loading…
Reference in a new issue