Defined Type: kmod::alias

Defined in:
manifests/alias.pp

Summary

Manage kernel module aliases

Overview

Examples:

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

Parameters:

  • source (String[1])

    Name of the module to alias

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

    State of the alias

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

    File to manage

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

    Name of the alias (defaults to the resource title)



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'manifests/alias.pp', line 12

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

  kmod::setting { "kmod::alias ${title}":
    ensure   => $ensure,
    module   => $aliasname,
    file     => $file,
    category => 'alias',
    option   => 'modulename',
    value    => $source,
  }
}