Do not do regex fo on variables that might not be defined yet
authorPeter Palfrader <peter@palfrader.org>
Thu, 21 Sep 2017 14:06:21 +0000 (14:06 +0000)
committerPeter Palfrader <peter@palfrader.org>
Thu, 21 Sep 2017 14:06:21 +0000 (14:06 +0000)
modules/grub/manifests/init.pp

index d23e3e8..bbb4ca4 100644 (file)
@@ -27,7 +27,7 @@ class grub {
 
        if $grub_manage {
                # hp-health requires nopat on linux 4.9
-               $grub_do_nopat = ($::systemproductname =~ /^ProLiant/ and versioncmp($::kernelversion, '4.9') >= 0)
+               $grub_do_nopat = ($::systemproductname and $::systemproductname =~ /^ProLiant/ and versioncmp($::kernelversion, '4.9') >= 0)
 
                $grub_do_extra = $::hostname in [fasolo]