X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/df083ed13f74574e55a679e7748cc3e937821cda..ba4a43e8d9825099d9203ad3baf1417b50b7958c:/cookbooks/hardware/recipes/default.rb diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 633edcb19..952729a00 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -59,14 +59,29 @@ case manufacturer when "HP" package "hponcfg" + execute "update-ilo" do + action :nothing + command "/usr/sbin/hponcfg -f /etc/ilo-defaults.xml" + end + + template "/etc/ilo-defaults.xml" do + source "ilo-defaults.xml.erb" + owner "root" + group "root" + mode "644" + notifies :run, "execute[update-ilo]" + end + package "hp-health" do action :install notifies :restart, "service[hp-health]" + only_if { node[:lsb][:release].to_f < 22.04 } end service "hp-health" do action [:enable, :start] supports :status => true, :restart => true + only_if { node[:lsb][:release].to_f < 22.04 } end if product.end_with?("Gen8", "Gen9") @@ -199,13 +214,17 @@ service "irqbalance" do supports :status => false, :restart => true, :reload => false end -# Link Layer Discovery Protocol Daemon package "lldpd" + service "lldpd" do action [:start, :enable] supports :status => true, :restart => true, :reload => true end +ohai_plugin "lldp" do + template "lldp.rb.erb" +end + tools_packages = [] status_packages = {} @@ -353,6 +372,10 @@ nvmes = if node[:hardware][:pci] [] end +unless nvmes.empty? + package "nvme-cli" +end + intel_nvmes = nvmes.select { |pci| pci[:vendor_name] == "Intel Corporation" } if !intel_ssds.empty? || !intel_nvmes.empty? @@ -547,6 +570,13 @@ end node[:hardware][:modules].each do |module_name| kernel_module module_name do action :install + not_if { kitchen? } + end +end + +node[:hardware][:blacklisted_modules].each do |module_name| + kernel_module module_name do + action :blacklist end end