* Install package impitool
This commit is contained in:
parent
a91c716898
commit
a58464933c
@ -6,4 +6,5 @@
|
||||
|
||||
|
||||
##### Changes
|
||||
* Install package ipmitool
|
||||
|
||||
|
@ -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
12
manifests/install.pp
Normal 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
18
manifests/params.pp
Normal 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
|
Loading…
Reference in New Issue
Block a user