nic_info_facts

pdk
Augment your facts with vendor and device info for each interface.

163 downloads

121 latest version

5.0 quality score

Version information

  • 0.1.1 (latest)
  • 0.1.0
released May 22nd 2024
This version is compatible with:
  • Puppet Enterprise 2025.3.x, 2025.2.x, 2025.1.x, 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
  • CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Debian
    ,
    Ubuntu

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'phihos-nic_info_facts', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add phihos-nic_info_facts
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install phihos-nic_info_facts --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

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

  1. Description
  2. Setup - The basics of getting started with nic_info_facts
  3. 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"
    }
}