* Ensure needed modules load at boot time

This commit is contained in:
gardouille 2015-01-19 13:46:49 +01:00
parent a58464933c
commit 34e2843c5d
5 changed files with 48 additions and 2 deletions

View File

@ -7,4 +7,4 @@
##### Changes
* Install package ipmitool
* Ensure needed modules load at boot time

29
manifests/config.pp Normal file
View 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

View File

@ -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

View File

@ -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'
}
}

View 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 -%>