X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/df083ed13f74574e55a679e7748cc3e937821cda..564fed40ce255edf3a6fe176b7c95b66540267af:/cookbooks/hardware/recipes/default.rb diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 633edcb19..49af1f52e 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -62,11 +62,13 @@ when "HP" 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 +201,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 +359,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 +557,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