Forge Home


Manage Linux kernel modules with Puppet


9,879 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 4.0.1 (latest)
  • 4.0.0
  • 3.2.0
  • 3.1.1
  • 3.1.0
  • 3.0.0
released Oct 2nd 2023
This version is compatible with:
  • Puppet Enterprise 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , , , , , , , Archlinux

Start using this module

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

Add this module to your Puppetfile:

mod 'puppet-kmod', '4.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-kmod
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-kmod --version 4.0.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.



puppet/kmod — version 4.0.1 Oct 2nd 2023

Kmod Puppet module

Build Status Release Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores docs Apache 2 License Donated by Camptocamp


This module provides definitions to manipulate modprobe.conf (5) stanzas:

  • kmod::alias
  • kmod::install
  • kmod::blacklist

It depends on Augeas with the modprobe lens.


This module has five main defined types:

  • kmod::load
  • kmod::alias
  • kmod::option
  • kmod::install
  • kmod::blacklist


Loads a module using modprobe and manages persistent modules in /etc/sysconfig/modules

  kmod::load { 'mymodule': }


Adds an alias to modprobe.conf, by default /etc/modprobe.d/<name>.conf is assumed for a filename.

  kmod::alias { 'bond0':
    source => 'bonding',


  • source: Name of the module to alias
  • aliasname: Name of the alias (defaults to the resource title)
  • file: File to write to (see above default)


Adds an option to modprobe.conf

  kmod::option { 'bond0 mode':
    module  => 'bond0',
    option  => 'mode',
    value   => '1',

  kmod::option { 'bond0':
    option => 'mode',
    value  => '1',


  • option: Name of the parameter to add
  • value: Value of the parameter
  • module: Name of the module (if ommited, the resource title is used)
  • file: File to write to (defaults to /etc/modprobe.d/<module name>.conf)


Manages modprobe blacklist entries. Blacklist entries prevents module aliases from being used, but would not prevent the module from being loaded. To prevent a module from being loaded use kmod::install

  kmod::blacklist { 'foo': }


  • file: File to write to, defaults to /etc/modprobe.d/blacklist.conf


Manage modprobe install entries

   kmod::install { 'pcspkr': }

If you want to ensure that module can't be loaded at all you can do the following:

   kmod::install { 'dccp': command => '/bin/false' }


  • file: File to write to (defaults to /etc/modprobe.d/<module name>.conf)
  • command: (optional) command associated with the install, defaults to /bin/true

Using the module with hiera

The module makes available lists for every defined type that will create those defined types if defined as class parameters. The parameters are:

  • kmod::list_of_blacklists:
  • kmod::list_of_aliases:
  • kmod::list_of_installs:
  • kmod::list_of_loads:
  • kmod::list_of_options:

Example usage:

  'foo01': {}
  'foo02': {}
  'foo03': {}
    source: 'squashfs'
    aliasname: 'squash01'
    source: 'squashfs'
    aliasname: 'squash02'
    command: '/bin/false'
    command: '/bin/true'
  'cramfs': {}
  'vfat': {}
  'bond0 mode':
    module: 'bond0'
    option: 'mode'
    value: '1'
    option: 'mode'
    value: '1'


Please report bugs and feature request using GitHub issue tracker.

For pull requests, it is very much appreciated to check your Puppet manifest with puppet-lint to follow the recommended Puppet style guidelines from the Puppet Labs style guide.

Transfer Notice

This plugin was originally authored by Camptocamp. The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Camptocamp.