This is what I came up with.
# Turn on fsck.auto on Z640 for NVME drives.
class z640 {
if $::productname == 'HP Z640 Workstation' {
notice('This is a Z640 workstation')
file { '/etc/default/grub':
ensure => present,
path => '/etc/default/grub',
mode => '0644',
owner => 'root',
group => 'root',
notify => Exec['grub-update'],
source => 'puppet:///modules/z640/grub'
}
exec { 'forcefsck':
command => '/bin/echo "-y" >/forcefsck',
onlyif => '/usr/bin/test ! -f /forcefsck'
}
exec { 'grub-update':
refreshonly => true,
command => '/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg',
}
}
}
On Tuesday, 27 September 2016 13:58:59 UTC-4, John Gelnaw wrote:
>
>
> if ($productname =~ /Z640/) {
>
> file { ... }
> exec { ... }
>
> }
>
> 'productname' is a fact which usually represents your system model.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/5d658518-8833-41f9-8f36-5a1d0f9b685e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.