* Install package impitool

This commit is contained in:
gardouille 2015-01-19 12:05:33 +01:00
parent a91c716898
commit a58464933c
4 changed files with 39 additions and 2 deletions

View File

@ -6,4 +6,5 @@
##### Changes
* Install package ipmitool

View File

@ -35,7 +35,13 @@
# WTFPL <http://wtfpl.org/>
#
#
class ipmi {
class ipmi (
$pkg_ensure = $ipmi::params::pkg_ensure,
$pkg_name = $ipmi::params::pkg_name,
) inherits ipmi::params {
include '::ipmi::install'
}
#Class['ipmi::install'] ->
} # Public class: ipmi

12
manifests/install.pp Normal file
View File

@ -0,0 +1,12 @@
# == Class: ipmi::install
#
# Insall IPMI packages.
#
class ipmi::install {
# Don't use "${...}" because pkg_name variable is an array
package { $ipmi::pkg_name:
ensure => "${ipmi::pkg_ensure}",
}
} # Private class: ipmi::install

18
manifests/params.pp Normal file
View File

@ -0,0 +1,18 @@
# == Class: ipmi::params
#
class ipmi::params {
case $::osfamily {
'Debian': {
if $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '7.0') >= 0 {
# Packages
$pkg_ensure = 'present'
$pkg_name = [ 'ipmitool' ]
}
}
default: {
fail("IPMI module was only tested on Debian system; osfamily (${::osfamily}) or lsbdistid (${::lsbdistid}) is unsupported")
}
}
} # Private class: ipmi::params