mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Merge pull request #11761 from amenonsen/9843-rebase
Add pciid to LinuxNetwork interface fact
This commit is contained in:
@@ -1858,6 +1858,8 @@ class LinuxNetwork(Network):
|
|||||||
path = os.path.join(path, 'bonding', 'all_slaves_active')
|
path = os.path.join(path, 'bonding', 'all_slaves_active')
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
interfaces[device]['all_slaves_active'] = get_file_content(path) == '1'
|
interfaces[device]['all_slaves_active'] = get_file_content(path) == '1'
|
||||||
|
if os.path.exists(os.path.join(path,'device')):
|
||||||
|
interfaces[device]['pciid'] = os.path.basename(os.readlink(os.path.join(path,'device')))
|
||||||
|
|
||||||
# Check whether an interface is in promiscuous mode
|
# Check whether an interface is in promiscuous mode
|
||||||
if os.path.exists(os.path.join(path,'flags')):
|
if os.path.exists(os.path.join(path,'flags')):
|
||||||
|
|||||||
Reference in New Issue
Block a user