Skip to content

Commit

Permalink
add ipmi puppet module
Browse files Browse the repository at this point in the history
- install module on all bare metal (hp/dell) hosts
  • Loading branch information
rrotter committed Oct 16, 2024
1 parent 85c17b1 commit 6d23482
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fixtures:
repo: "https://github.com/mlibrary/puppetlabs-apache"
forge_modules:
rbenv: {"repo": "jdowning/rbenv", "ref": "3.0.0" }
ipmi: {"repo": "jhoblitt/ipmi", "ref": "6.1.0" }
archive: {"repo": "puppet/archive", "ref": "7.1.0" }
kmod: {"repo": "puppet/kmod", "ref": "4.0.1" }
# TODO: Puppet 8 requires version 11. 11 requires lens changes. https://forge.puppet.com/modules/puppet/letsencrypt/changelog
Expand Down
4 changes: 4 additions & 0 deletions manifests/profile/base.pp
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@

if $facts['dmi'] and ($facts['dmi']['manufacturer'] == 'HP' or $facts['dmi']['manufacturer'] == 'HPE') {
include nebula::profile::base::hp
include nebula::profile::base::ipmi
}
if $facts['dmi'] and ($facts['dmi']['manufacturer'] == 'Dell Inc.') {
include nebula::profile::base::ipmi
}
}
12 changes: 12 additions & 0 deletions manifests/profile/base/ipmi.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# nebula::profile::base::ipmi
#
# add IPMI facts to puppetdb
# TODO: export resource for drac/ilo ip, hostname
# TODO: add ipmi configuration (manage users, etc)
#
# @example
# include nebula::profile::base::impi
class nebula::profile::base::ipmi
{
include ipmi
}
1 change: 1 addition & 0 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"issues_url": "https://github.com/mlibrary/nebula/issues",
"dependencies": [
{"name": "jdowning/rbenv", "version_requirement": ">= 3.0.0 < 4.0.0" },
{"name": "jhoblitt/ipmi", "version_requirement": ">= 6.1.0 < 7.0.0" },
{"name": "puppet/archive", "version_requirement": ">= 7.1.0 < 8.0.0" },
{"name": "puppet/kmod", "version_requirement": ">= 4.0.1 < 5.0.0" },
{"name": "puppet/letsencrypt", "version_requirement": ">= 10.1.0 < 11.0.0"},
Expand Down
4 changes: 4 additions & 0 deletions spec/classes/profile/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def contain_base_class(name)
file: '/etc/modprobe.d/acpi_power_meter-blacklist.conf',
)
end

it { is_expected.to is_expected.to contain_class('ipmi') }
end

context 'on an HPE machine' do
Expand All @@ -142,6 +144,7 @@ def contain_base_class(name)
end

it { is_expected.to contain_package('ssacli') }
it { is_expected.to contain_class('ipmi') }
end

context 'on an Dell machine' do
Expand All @@ -151,6 +154,7 @@ def contain_base_class(name)

it { is_expected.not_to contain_kmod__blacklist('hpwdt') }
it { is_expected.not_to contain_kmod__blacklist('acpi_power_meter') }
it { is_expected.to contain_class('ipmi') }
end

it { is_expected.not_to contain_package('i40e-dkms') }
Expand Down

0 comments on commit 6d23482

Please # to comment.