]> git.openstreetmap.org Git - chef.git/commitdiff
Use focal/current-gen10 repository for Gen10
authorTom Hughes <tom@compton.nu>
Sun, 25 Sep 2022 23:41:23 +0000 (00:41 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 25 Sep 2022 23:41:23 +0000 (00:41 +0100)
cookbooks/apt/recipes/management-component-pack.rb

index 3b3f09b09a526d9e232a6f801b173f9a45423943..50ec5b8d19c847d2500af77b57527268bcaec710 100644 (file)
 
 include_recipe "apt"
 
+distribution_name = if node[:dmi][:system][:product_name].end_with?("Gen10")
+                      "focal/current-gen10"
+                    else
+                      "bionic/current-gen9"
+                    end
+
 apt_repository "management-component-pack" do
   uri "https://downloads.linux.hpe.com/SDR/repo/mcp"
-  distribution "bionic/current-gen9"
+  distribution distribution_name
   components ["non-free"]
   key "C208ADDE26C2B797"
 end