Defined Type: kmod::install

Defined in:
manifests/install.pp

Summary

Set a kernel module as installed

Overview

Examples:

kmod::install { 'pcspkr': }

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: 'present')

    State of the setting

  • command (String[1]) (defaults to: '/bin/true')

    Command associated with the kernel module

  • file (Stdlib::Unixpath) (defaults to: "/etc/modprobe.d/${name}.conf")

    File where the stanza is written



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'manifests/install.pp', line 9

define kmod::install (
  Enum['present', 'absent'] $ensure  = 'present',
  String[1]                 $command = '/bin/true',
  Stdlib::Unixpath          $file    = "/etc/modprobe.d/${name}.conf",
) {
  include kmod

  kmod::setting { "kmod::install ${title}":
    ensure   => $ensure,
    module   => $name,
    file     => $file,
    category => 'install',
    option   => 'command',
    value    => $command,
  }
}