nic_info_facts
Augment your facts with vendor and device info for each interface.
Version information
released May 22nd 2024
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
- Puppet >= 7.24 < 9.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'phihos-nic_info_facts', '0.1.1'
Learn more about managing modules with a PuppetfileDocumentation
phihos/nic_info_facts — version 0.1.1 May 22nd 2024
nic_info_facts
Augment your facts with vendor and device info for each interface.
Table of Contents
- Description
- Setup - The basics of getting started with nic_info_facts
- Usage - Configuration options and additional functionality
Description
Puppet's default facts to not expose the model or vendor of a physical NIC.
This module fetches the vendor ID from /sys/class/net/<interface>>/device/vendor
and the device ID from /sys/class/net/eno1/device/device
.
Additionally it tries to resolve the vendor name and device (model) name from /usr/share/misc/pci.ids
.
This approach is really fast compared to tools like lshw
and does not require any additional binary.
Setup
Setup Requirements
Check which OS package provides /usr/share/misc/pci.ids
. If not installed the fields vendor_name
and device_name
will be empty.
Usage
Just install this module and puppet facts | jq '.values.nic_info'
should show something like this:
{
"eno1": {
"vendor_id": "0x8086",
"device_id": "0x1563",
"vendor_name": "Intel Corporation",
"device_name": "Ethernet Controller X550"
}
}