44 lines
1.1 KiB
Puppet
44 lines
1.1 KiB
Puppet
# == Class: ipmi::config
|
|
#
|
|
# Some tiny configurations for IPMI
|
|
#
|
|
class ipmi::config {
|
|
|
|
File {
|
|
owner => root,
|
|
group => root,
|
|
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']) {
|
|
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'],
|
|
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
|