diff --git a/.fixtures.yml b/.fixtures.yml index 4c99ec0a4..b1c46da59 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -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 diff --git a/manifests/profile/base.pp b/manifests/profile/base.pp index 12abaa43e..9c8ee14f7 100644 --- a/manifests/profile/base.pp +++ b/manifests/profile/base.pp @@ -60,6 +60,10 @@ 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 } include nebula::profile::base::i40e diff --git a/manifests/profile/base/ipmi.pp b/manifests/profile/base/ipmi.pp new file mode 100644 index 000000000..5920ed4f7 --- /dev/null +++ b/manifests/profile/base/ipmi.pp @@ -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 +} diff --git a/metadata.json b/metadata.json index 78d2f8bff..209da0754 100644 --- a/metadata.json +++ b/metadata.json @@ -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"}, diff --git a/spec/classes/profile/base_spec.rb b/spec/classes/profile/base_spec.rb index 5e4e06862..7e03e8427 100644 --- a/spec/classes/profile/base_spec.rb +++ b/spec/classes/profile/base_spec.rb @@ -112,15 +112,9 @@ def contain_base_class(name) end it do - is_expected.to contain_kmod__blacklist('hpwdt').with( - file: '/etc/modprobe.d/hpwdt-blacklist.conf', - ) - end - - it do - is_expected.to contain_kmod__blacklist('acpi_power_meter').with( - file: '/etc/modprobe.d/acpi_power_meter-blacklist.conf', - ) + is_expected.to contain_kmod__blacklist('hpwdt').with(file: '/etc/modprobe.d/hpwdt-blacklist.conf') + is_expected.to contain_kmod__blacklist('acpi_power_meter').with(file: '/etc/modprobe.d/acpi_power_meter-blacklist.conf') + is_expected.to contain_class('ipmi') end end @@ -130,15 +124,9 @@ def contain_base_class(name) end it do - is_expected.to contain_kmod__blacklist('hpwdt').with( - file: '/etc/modprobe.d/hpwdt-blacklist.conf', - ) - end - - it do - is_expected.to contain_kmod__blacklist('acpi_power_meter').with( - file: '/etc/modprobe.d/acpi_power_meter-blacklist.conf', - ) + is_expected.to contain_kmod__blacklist('hpwdt').with(file: '/etc/modprobe.d/hpwdt-blacklist.conf') + is_expected.to contain_kmod__blacklist('acpi_power_meter').with(file: '/etc/modprobe.d/acpi_power_meter-blacklist.conf') + is_expected.to contain_class('ipmi') end it { is_expected.to contain_package('ssacli') } @@ -149,8 +137,11 @@ def contain_base_class(name) super().merge('dmi' => { 'manufacturer' => 'Dell Inc.' }) end - it { is_expected.not_to contain_kmod__blacklist('hpwdt') } - it { is_expected.not_to contain_kmod__blacklist('acpi_power_meter') } + it do + is_expected.not_to contain_kmod__blacklist('hpwdt') + is_expected.not_to contain_kmod__blacklist('acpi_power_meter') + is_expected.to contain_class('ipmi') + end end it { is_expected.not_to contain_package('i40e-dkms') }