X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/efe905e5c652fc9667980254fefe2b860ca6044d..fd1b5c3bba273140810558c086d5915d6aa53725:/cookbooks/hardware/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 596d2701d..751810a3e 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -199,13 +199,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 +357,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? @@ -540,16 +548,21 @@ if File.exist?("/etc/mdadm/mdadm.conf") end end -template "/etc/modules" do - source "modules.erb" - owner "root" - group "root" - mode "644" +file "/etc/modules" do + action :delete end -service "kmod" do - action :nothing - subscribes :start, "template[/etc/modules]" +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 if node[:hardware][:watchdog]