manage kernel module with puppet
Ruby Puppet Shell
Latest commit 0d69a96 Jun 24, 2016 @mcanevet mcanevet Update with modulesync
Failed to load latest commit information.
.sync.yml Use forge_password in .sync.yml Nov 12, 2014
.travis.yml Release 2.1.0 Aug 27, 2015
Gemfile Update with modulesync Jun 24, 2016
LICENSE Remove License section from refering to GPL Dec 15, 2015
Rakefile Update with modulesync Jun 24, 2016
metadata.json Release 2.1.0 Aug 27, 2015

Kmod Puppet module

Puppet Forge Version Puppet Forge Downloads Build Status Puppet Forge Endorsement Gemnasium 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':
    modulename => 'bonding',


  • modulename: 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


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.