* Ensure needed modules load at boot time
This commit is contained in:
parent
a58464933c
commit
34e2843c5d
@ -7,4 +7,4 @@
|
||||
|
||||
##### Changes
|
||||
* Install package ipmitool
|
||||
|
||||
* Ensure needed modules load at boot time
|
||||
|
29
manifests/config.pp
Normal file
29
manifests/config.pp
Normal file
@ -0,0 +1,29 @@
|
||||
# == Class: ipmi::config
|
||||
#
|
||||
# Some tiny configurations for IPMI
|
||||
#
|
||||
class ipmi::config {
|
||||
|
||||
File {
|
||||
owner => root,
|
||||
group => root,
|
||||
mode => 0644,
|
||||
}
|
||||
|
||||
## Modules
|
||||
# Directory which contains kernel modules to load during boot time
|
||||
if ! defined(File['/etc/modules-load.d']) {
|
||||
file { '/etc/modules-load.d':
|
||||
ensure => directory,
|
||||
}
|
||||
}
|
||||
# Additionnal modules to load at boot time
|
||||
file { "${ipmi::modules_file_path}":
|
||||
ensure => 'present',
|
||||
content => template("${ipmi::modules_file_content}"),
|
||||
require => File['/etc/modules-load.d'],
|
||||
}
|
||||
|
||||
|
||||
|
||||
} # Private class: ipmi::config
|
@ -38,10 +38,15 @@
|
||||
class ipmi (
|
||||
$pkg_ensure = $ipmi::params::pkg_ensure,
|
||||
$pkg_name = $ipmi::params::pkg_name,
|
||||
$modules_list = $ipmi::params::modules_list,
|
||||
$modules_file_path = $ipmi::params::modules_file_path,
|
||||
$modules_file_content = $ipmi::params::modules_file_content,
|
||||
) inherits ipmi::params {
|
||||
|
||||
include '::ipmi::install'
|
||||
include '::ipmi::config'
|
||||
|
||||
#Class['ipmi::install'] ->
|
||||
Class['ipmi::install'] ->
|
||||
Class['ipmi::config']
|
||||
|
||||
} # Public class: ipmi
|
||||
|
@ -8,6 +8,10 @@ class ipmi::params {
|
||||
$pkg_ensure = 'present'
|
||||
$pkg_name = [ 'ipmitool' ]
|
||||
|
||||
# Modules
|
||||
$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'
|
||||
|
||||
}
|
||||
}
|
||||
|
8
templates/ipmi_modules.conf.erb
Normal file
8
templates/ipmi_modules.conf.erb
Normal file
@ -0,0 +1,8 @@
|
||||
#file generated by puppet
|
||||
#Don't edit, please see https://forge.puppetlabs.com/gardouille/proxmox
|
||||
|
||||
## Load additonnal modules for IPMI
|
||||
<% @modules_list.each do |val| -%>
|
||||
<%= val %>
|
||||
<% end -%>
|
||||
|
Loading…
Reference in New Issue
Block a user