Don't set grub_do_nopat or grub_do_extra unless grub_manage is set
authorJulien Cristau <jcristau@debian.org>
Tue, 12 Sep 2017 13:33:11 +0000 (15:33 +0200)
committerJulien Cristau <jcristau@debian.org>
Tue, 12 Sep 2017 13:33:11 +0000 (15:33 +0200)
modules/grub/manifests/init.pp

index 7d9a181..989d444 100644 (file)
@@ -25,11 +25,12 @@ class grub {
                $grub_manage = false
        }
 
-       # 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 {
+               # 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]
+
                file { '/etc/default/grub':
                        # restore to default
                        source => 'puppet:///modules/grub/etc-default-grub',