* Load one needed module (for Debian) one time
This commit is contained in:
parent
34e2843c5d
commit
ee48f48678
|
@ -8,3 +8,4 @@
|
|||
##### Changes
|
||||
* Install package ipmitool
|
||||
* Ensure needed modules load at boot time
|
||||
* Load one needed module (for Debian) one time
|
||||
|
|
|
@ -10,6 +10,12 @@ class ipmi::config {
|
|||
mode => 0644,
|
||||
}
|
||||
|
||||
Exec {
|
||||
path => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
|
||||
logoutput => 'on_failure',
|
||||
}
|
||||
|
||||
|
||||
## Modules
|
||||
# Directory which contains kernel modules to load during boot time
|
||||
if ! defined(File['/etc/modules-load.d']) {
|
||||
|
@ -22,8 +28,16 @@ class ipmi::config {
|
|||
ensure => 'present',
|
||||
content => template("${ipmi::modules_file_content}"),
|
||||
require => File['/etc/modules-load.d'],
|
||||
notify => Exec["load_${ipmi::needed_module_name}_module"],
|
||||
}
|
||||
|
||||
# Need to load one module manually only one time (the previous configuration
|
||||
# file will load it automatically at next reboot.
|
||||
exec { "load_${ipmi::needed_module_name}_module":
|
||||
command => "modprobe ${ipmi::needed_module_name}",
|
||||
refreshonly => true,
|
||||
unless => "lsmod | grep ${ipmi::needed_module_name}",
|
||||
}
|
||||
|
||||
|
||||
|
||||
} # Private class: ipmi::config
|
||||
|
|
|
@ -41,6 +41,7 @@ class ipmi (
|
|||
$modules_list = $ipmi::params::modules_list,
|
||||
$modules_file_path = $ipmi::params::modules_file_path,
|
||||
$modules_file_content = $ipmi::params::modules_file_content,
|
||||
$needed_module_name = $ipmi::params::needed_module_name,
|
||||
) inherits ipmi::params {
|
||||
|
||||
include '::ipmi::install'
|
||||
|
|
|
@ -12,6 +12,8 @@ class ipmi::params {
|
|||
$modules_list = [ 'ipmi_devintf', 'ipmi_si', 'ipmi_msghandler' ]
|
||||
$modules_file_path = '/etc/modules-load.d/ipmi.conf'
|
||||
$modules_file_content = 'ipmi/ipmi_modules.conf.erb'
|
||||
# The module name to load manually the first time
|
||||
$needed_module_name = 'ipmi_devintf'
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue