From 0e39eff9759a6ae4c50c5ed8eeb9e8bef2d2ad64 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 8 Nov 2021 11:07:59 +0000 Subject: [PATCH] Blacklist acpi_power_meter on G6 machines --- cookbooks/hardware/attributes/default.rb | 1 + cookbooks/hardware/recipes/default.rb | 6 ++++++ roles/hp-dl180-g6.rb | 3 +++ roles/hp-dl360-g6.rb | 3 +++ 4 files changed, 13 insertions(+) diff --git a/cookbooks/hardware/attributes/default.rb b/cookbooks/hardware/attributes/default.rb index 00886cc22..f0b0f73b1 100644 --- a/cookbooks/hardware/attributes/default.rb +++ b/cookbooks/hardware/attributes/default.rb @@ -1,4 +1,5 @@ default[:hardware][:modules] = %w[lp] +default[:hardware][:blacklisted_modules] = %w[] default[:hardware][:grub][:cmdline] = %w[nomodeset] default[:hardware][:sensors] = {} default[:hardware][:hwmon] = {} diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 633edcb19..7736cd507 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -550,6 +550,12 @@ node[:hardware][:modules].each do |module_name| end end +node[:hardware][:blacklisted_modules].each do |module_name| + kernel_module module_name do + action :blacklist + end +end + if node[:hardware][:watchdog] package "watchdog" diff --git a/roles/hp-dl180-g6.rb b/roles/hp-dl180-g6.rb index 2c64ec8e4..20125bb34 100644 --- a/roles/hp-dl180-g6.rb +++ b/roles/hp-dl180-g6.rb @@ -2,6 +2,9 @@ name "hp-dl180-g6" description "Role applied to all HP DL180 G6 machines" default_attributes( + :hardware => { + :blacklisted_modules => %w[acpi_power_meter] + }, :munin => { :plugins => { :hpasmcli2_fans => { diff --git a/roles/hp-dl360-g6.rb b/roles/hp-dl360-g6.rb index 0c27aca8e..c7a14cda4 100644 --- a/roles/hp-dl360-g6.rb +++ b/roles/hp-dl360-g6.rb @@ -2,6 +2,9 @@ name "hp-dl360-g6" description "Role applied to all HP DL360 G6 machines" default_attributes( + :hardware => { + :blacklisted_modules => %w[acpi_power_meter] + }, :munin => { :plugins => { :hpasmcli2_fans => { -- 2.39.5