X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/efe905e5c652fc9667980254fefe2b860ca6044d..7dea747820c21c7d45070bff703d58534aada3ba:/cookbooks/hardware/recipes/default.rb?ds=inline diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 596d2701d..7f1431320 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -540,16 +540,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]