And set net.ifnames to 0
[mirror/dsa-puppet.git] / modules / grub / manifests / init.pp
index dab3d56..1ef9ec7 100644 (file)
@@ -1,7 +1,19 @@
 class grub {
        if ($::kernel == 'Linux' and $::is_virtual and $::virtual == 'kvm') {
                file { '/etc/default/grub':
-                       source  => 'puppet:///modules/grub/etc-default-grub',
+                       # restore to default
+                       source => 'puppet:///modules/grub/etc-default-grub',
+                       notify  => Exec['update-grub']
+               }
+               file { '/etc/default/grub.d':
+                       ensure => directory
+               }
+               file { '/etc/default/grub.d/puppet-grub-serial.cfg':
+                       content  => template('grub/puppet-grub-serial.cfg.erb'),
+                       notify  => Exec['update-grub']
+               }
+               file { '/etc/default/grub.d/puppet-net-ifnames.cfg':
+                       content  => template('grub/puppet-net-ifnames.cfg.erb'),
                        notify  => Exec['update-grub']
                }