grub: don't hardcode the list of hosts with nopat
authorJulien Cristau <jcristau@debian.org>
Sun, 3 Sep 2017 16:07:13 +0000 (18:07 +0200)
committerJulien Cristau <jcristau@debian.org>
Sun, 3 Sep 2017 16:08:13 +0000 (18:08 +0200)
modules/grub/manifests/init.pp

index 3eeb828..7d9a181 100644 (file)
@@ -25,7 +25,8 @@ class grub {
                $grub_manage = false
        }
 
-       $grub_do_nopat = $::hostname in [ubc-enc2bl01,ubc-enc2bl02,ubc-enc2bl09,ubc-enc2bl10,casulana,mirror-anu,sallinen,storace,mirror-accumu,bm-bl1,bm-bl2,bm-bl3,bm-bl4,bm-bl5,bm-bl6,bm-bl7,bm-bl8,bm-bl9,bm-bl10,bm-bl11,bm-bl12,bm-bl13,bm-bl14,villa]
+       # hp-health requires nopat on linux 4.9
+       $grub_do_nopat = ($::systemproductname =~ /^ProLiant/ and versioncmp($::kernelversion, '4.9') >= 0)
        $grub_do_extra = $::hostname in [fasolo]
 
        if $grub_manage {