kmod
: Ensures a couple of mandatory files are present before managing their content.
kmod::alias
: Manage kernel module aliaseskmod::blacklist
: Set a kernel module as blacklisted.kmod::install
: Set a kernel module as installedkmod::load
: Manage a kernel module in /etc/modules.kmod::option
: Manage kernel module optionskmod::setting
: Manage kernel module settings
Ensures a couple of mandatory files are present before managing their content.
include kmod
The following parameters are available in the kmod
class:
list_of_aliases
list_of_blacklists
list_of_installs
list_of_loads
list_of_options
owner
group
directory_mode
file_mode
exe_mode
modprobe_d
modprobe_d_files
Data type: Hash
Hash of kmod::alias
resources
Default value: {}
Data type: Hash
Hash of kmod::blacklist
resources
Default value: {}
Data type: Hash
Hash of kmod::install
resources
Default value: {}
Data type: Hash
Hash of kmod::load
resources
Default value: {}
Data type: Hash
Hash of kmod::option
resources
Default value: {}
Data type: String[1]
Default owner for all files (set via Hiera to allow defaults on all defined types)
Default value: 'root'
Data type: String[1]
Default group for all files (set via Hiera to allow defaults on all defined types)
Default value: 'root'
Data type: Stdlib::Filemode
Default mode for all directories (set via Hiera to allow defaults on all defined types)
Default value: '0755'
Data type: Stdlib::Filemode
Default mode for all regular files (set via Hiera to allow defaults on all defined types)
Default value: '0644'
Data type: Stdlib::Filemode
Default mode for all executable files (set via Hiera to allow defaults on all defined types)
Default value: '0755'
Data type: Stdlib::Unixpath
Location of modprobe.d
directory
Default value: '/etc/modprobe.d'
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',
]
Manage kernel module aliases
kmod::alias { 'bond0':
source => 'bonding',
}
The following parameters are available in the kmod::alias
defined type:
Data type: String[1]
Name of the module to alias
Data type: Enum['present', 'absent']
State of the alias
Default value: 'present'
Data type: Stdlib::Unixpath
File to manage
Default value: "/etc/modprobe.d/${name}.conf"
Data type: String[1]
Name of the alias (defaults to the resource title)
Default value: $name
Set a kernel module as blacklisted.
kmod::blacklist { 'pcspkr': }
The following parameters are available in the kmod::blacklist
defined type:
Data type: Enum['present', 'absent']
State of the setting
Default value: 'present'
Data type: Stdlib::Unixpath
File to manage
Default value: '/etc/modprobe.d/blacklist.conf'
Set a kernel module as installed
kmod::install { 'pcspkr': }
The following parameters are available in the kmod::install
defined type:
Data type: Enum['present', 'absent']
State of the setting
Default value: 'present'
Data type: String[1]
Command associated with the kernel module
Default value: '/bin/true'
Data type: Stdlib::Unixpath
File where the stanza is written
Default value: "/etc/modprobe.d/${name}.conf"
Manage a kernel module in /etc/modules.
kmod::load { 'sha256': }
The following parameters are available in the kmod::load
defined type:
Data type: Enum['present', 'absent']
State of the setting
Default value: 'present'
Manage kernel module options
kmod::option { 'bond0 mode':
module => 'bond0',
option => 'mode',
value => '1',
}
The following parameters are available in the kmod::option
defined type:
Data type: String[1]
Option to manage
Data type: Scalar
Value of kernel module option
Data type: String[1]
Kernel module to manage
Default value: $name
Data type: Enum['present', 'absent']
State of the option
Default value: 'present'
Data type: Stdlib::Unixpath
File to manage
Default value: "/etc/modprobe.d/${module}.conf"
Manage kernel module settings
kmod__setting { 'kmod::option bond0 mode':
ensure => 'present',
module => 'bond0',
category => 'options',
file => '/etc/modprobe.d/bond0.conf',
option => 'mode',
value => '1',
}
The following parameters are available in the kmod::setting
defined type:
Data type: Stdlib::Unixpath
File to manage
Data type: String[1]
Setting type
Data type: Optional[String]
Key to manage
Default value: undef
Data type: Optional[Scalar]
Value to manage
Default value: undef
Data type: String[1]
Module to manage
Default value: $name
Data type: Enum['present', 'absent']
State of the setting
Default value: 'present'