X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/bfed2ce1aa34276f71876ff265c1e0f5980331e4..7dea747820c21c7d45070bff703d58534aada3ba:/cookbooks/hardware/recipes/default.rb diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 88bb45613..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 "systemd-modules-load" do - action :nothing - subscribes :restart, "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]