mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add perm_hwaddr on Linux bonding slave nics (#19071)
This patch will additionally report the `perm_hwaddr` fact of a Linux bonding slave network interface. Related to issue #19067
This commit is contained in:
committed by
Adrian Likins
parent
455aff8436
commit
66818050b0
@@ -2546,6 +2546,8 @@ class LinuxNetwork(Network):
|
||||
path = os.path.join(path, 'bonding', 'all_slaves_active')
|
||||
if os.path.exists(path):
|
||||
interfaces[device]['all_slaves_active'] = get_file_content(path) == '1'
|
||||
if os.path.exists(os.path.join(path, 'bonding_slave')):
|
||||
interfaces[device]['perm_macaddress'] = get_file_content(os.path.join(path, 'bonding_slave', 'perm_hwaddr'), default='')
|
||||
if os.path.exists(os.path.join(path,'device')):
|
||||
interfaces[device]['pciid'] = os.path.basename(os.readlink(os.path.join(path,'device')))
|
||||
if os.path.exists(os.path.join(path, 'speed')):
|
||||
|
||||
Reference in New Issue
Block a user