Defined Type: kmod::option

Defined in:
manifests/option.pp

Summary

Manage kernel module options

Overview

Examples:

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

Parameters:

  • option (String[1])

    Option to manage

  • value (Scalar)

    Value of kernel module option

  • module (String[1]) (defaults to: $name)

    Kernel module to manage

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

    State of the option

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

    File to manage



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'manifests/option.pp', line 15

define kmod::option (
  String[1]                 $option,
  Scalar                    $value,
  String[1]                 $module = $name,
  Enum['present', 'absent'] $ensure = 'present',
  Stdlib::Unixpath          $file   = "/etc/modprobe.d/${module}.conf",
) {
  include kmod

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