Skip to content

Latest commit

 

History

History
450 lines (257 loc) · 8.6 KB

REFERENCE.md

File metadata and controls

450 lines (257 loc) · 8.6 KB

Reference

Table of Contents

Classes

  • kmod: Ensures a couple of mandatory files are present before managing their content.

Defined types

Classes

kmod

Ensures a couple of mandatory files are present before managing their content.

Examples

include kmod

Parameters

The following parameters are available in the kmod class:

list_of_aliases

Data type: Hash

Hash of kmod::alias resources

Default value: {}

list_of_blacklists

Data type: Hash

Hash of kmod::blacklist resources

Default value: {}

list_of_installs

Data type: Hash

Hash of kmod::install resources

Default value: {}

list_of_loads

Data type: Hash

Hash of kmod::load resources

Default value: {}

list_of_options

Data type: Hash

Hash of kmod::option resources

Default value: {}

owner

Data type: String[1]

Default owner for all files (set via Hiera to allow defaults on all defined types)

Default value: 'root'

group

Data type: String[1]

Default group for all files (set via Hiera to allow defaults on all defined types)

Default value: 'root'

directory_mode

Data type: Stdlib::Filemode

Default mode for all directories (set via Hiera to allow defaults on all defined types)

Default value: '0755'

file_mode

Data type: Stdlib::Filemode

Default mode for all regular files (set via Hiera to allow defaults on all defined types)

Default value: '0644'

exe_mode

Data type: Stdlib::Filemode

Default mode for all executable files (set via Hiera to allow defaults on all defined types)

Default value: '0755'

modprobe_d

Data type: Stdlib::Unixpath

Location of modprobe.d directory

Default value: '/etc/modprobe.d'

modprobe_d_files

Data type: Array[Stdlib::Unixpath]

Default files to create in modprobe.d directory

Default value:

[
    '/etc/modprobe.d/modprobe.conf',
    '/etc/modprobe.d/aliases.conf',
    '/etc/modprobe.d/blacklist.conf',
  ]

Defined types

kmod::alias

Manage kernel module aliases

Examples

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

Parameters

The following parameters are available in the kmod::alias defined type:

source

Data type: String[1]

Name of the module to alias

ensure

Data type: Enum['present', 'absent']

State of the alias

Default value: 'present'

file

Data type: Stdlib::Unixpath

File to manage

Default value: "/etc/modprobe.d/${name}.conf"

aliasname

Data type: String[1]

Name of the alias (defaults to the resource title)

Default value: $name

kmod::blacklist

Set a kernel module as blacklisted.

Examples

kmod::blacklist { 'pcspkr': }

Parameters

The following parameters are available in the kmod::blacklist defined type:

ensure

Data type: Enum['present', 'absent']

State of the setting

Default value: 'present'

file

Data type: Stdlib::Unixpath

File to manage

Default value: '/etc/modprobe.d/blacklist.conf'

kmod::install

Set a kernel module as installed

Examples

kmod::install { 'pcspkr': }

Parameters

The following parameters are available in the kmod::install defined type:

ensure

Data type: Enum['present', 'absent']

State of the setting

Default value: 'present'

command

Data type: String[1]

Command associated with the kernel module

Default value: '/bin/true'

file

Data type: Stdlib::Unixpath

File where the stanza is written

Default value: "/etc/modprobe.d/${name}.conf"

kmod::load

Manage a kernel module in /etc/modules.

Examples

kmod::load { 'sha256': }

Parameters

The following parameters are available in the kmod::load defined type:

ensure

Data type: Enum['present', 'absent']

State of the setting

Default value: 'present'

kmod::option

Manage kernel module options

Examples

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

Parameters

The following parameters are available in the kmod::option defined type:

option

Data type: String[1]

Option to manage

value

Data type: Scalar

Value of kernel module option

module

Data type: String[1]

Kernel module to manage

Default value: $name

ensure

Data type: Enum['present', 'absent']

State of the option

Default value: 'present'

file

Data type: Stdlib::Unixpath

File to manage

Default value: "/etc/modprobe.d/${module}.conf"

kmod::setting

Manage kernel module settings

Examples

kmod__setting { 'kmod::option bond0 mode':
  ensure   => 'present',
  module   => 'bond0',
  category => 'options',
  file     => '/etc/modprobe.d/bond0.conf',
  option   => 'mode',
  value    => '1',
}

Parameters

The following parameters are available in the kmod::setting defined type:

file

Data type: Stdlib::Unixpath

File to manage

category

Data type: String[1]

Setting type

option

Data type: Optional[String]

Key to manage

Default value: undef

value

Data type: Optional[Scalar]

Value to manage

Default value: undef

module

Data type: String[1]

Module to manage

Default value: $name

ensure

Data type: Enum['present', 'absent']

State of the setting

Default value: 'present'