# hp-health requires nopat on linux 4.9
$grub_do_nopat = ($::systemproductname and $::systemproductname =~ /^ProLiant/ and versioncmp($::kernelversion, '4.9') >= 0)
+ $grub_do_pti_on = ($::debarchitecture == 'amd64' and versioncmp($::lsbmajdistrelease, '9') >= 0)
+
$grub_do_extra = $::hostname in [fasolo,grnet-node01,grnet-node02]
file { '/etc/default/grub':
content => template('grub/puppet-kernel-extra.cfg.erb'),
notify => Exec['update-grub']
}
+
+ file { '/etc/default/grub.d/puppet-kernel-pti-on.cfg':
+ ensure => $grub_do_pti_on ? { true => 'present', default => 'absent' },
+ content => template('grub/puppet-kernel-pti-on.cfg.erb'),
+ notify => Exec['update-grub']
+ }
}
exec { 'update-grub':