From 4dca09e799a49d61e09a832a8d7bc23f2fc176a4 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 12 Mar 2024 21:15:16 +0000 Subject: [PATCH] hardware: do not fail if node[:hardware][:pci] is undefined (tests) --- cookbooks/hardware/recipes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index d77aebacd..4e676f387 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -227,7 +227,7 @@ else end watchdog_module = %w[hpwdt sp5100_tco].find do |module_name| - node[:hardware][:pci].any? { |_, pci| pci[:modules]&.any?(module_name) } + node[:hardware][:pci]&.any? { |_, pci| pci[:modules]&.any?(module_name) } end if node[:kernel][:modules].include?("ipmi_si") -- 2.45.1