Provide a fact with PCI device identifiers
Olav Morken

Olav Morken



6,449 latest version

4.1 quality score

Version information

  • 0.0.1 (latest)
released Jul 3rd 2019

Start using this module


olavmrk/pci_devices_fact — version 0.0.1 Jul 3rd 2019


Table of Contents

  1. Description
  2. Setup - The basics of getting started with pci_devices_fact
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module


This module provides the pci_devices-fact, which contains an array of PCI IDs for the node.

The pci_devices fact can then be used to check available hardware on the node from within Puppet manifests.


Setup Requirements

This module requires pushing a new fact to the node, and therefore requires Plugincync to be enabled. The fact is returned as an array, so if you are running Puppet 3.8 or older, you need to verify that the stringify_facts option is set to false.

Beginning with pci_devices_fact

Once the module is installed, you can access the pci_devices fact from manifests:



The pci_devices fact can be used to test for specific hardware in Puppet manifests. The simplest way is to use the in-operator to check for the precence of one element in the array.

For example, to install the Realtek firmware in the precense of one of their WiFi adapters:

if '10ec:8176' in $::pci_devices {


This module provides a single fact:


An array of PCI device identifiers for devices in the node. For example:

pci_devices => [


This module retrieves the device list by enumerating the PCI devices found in sysfs on Linux. As such, only Linux is supported, and sysfs musb be available to the Puppet agent.


This module is hosted in a Git repository at GitHub.