This module manages GRUB 2 bootloader. It does not modify the grub2 configurations files directly but changes the OS specific configuration files (for example /etc/sysconfig/grub on RedHat) and then uses the OS supplied grub2-mkconfig to generate the config files. It will never reboot a system after configuration.
- Red Hat
- Internal. Puppet template to use
- STRING : 'grub2/grub.erb'
- Internal. Used to flatten hiera_array into string
- STRING : Empty by default
- Aditional parameters to add to CMDLINE_LINUX
- Hiera array : Empty by default
- Base parameters to add to CMDLINE_LINUX
- STRING : OS specific
- Number of seconds that menu will appear
- STRING : 5
- Default boot entry. You probably don't want to change this.
- STRING : saved
- Terminal output.
- STRING : console
- tbd
- STRING : true
- tbd
- STRING : true
class { 'grub2':
cmdline_linux_base => 'rd.lvm.lv=sysvg/lv_swap biosdevname=0 rd.lvm.lv=sysvg/lv_root rhgb quiet',
timeout => '5',
disable_recovery => 'true',
disable_submenu => 'true'
}
This module also supports the configuration of the parameters it exposes
using Hiera. To set the value of timeout
to 10
, you would use:
grub2::timeout: 10
In adition to this, cmd_linux_extra is an hiera_array where setting can be added at multiple levels in your Hiera files:
Level 1:
grub2::cmdline_linux_extra:
- vga=normal
Level 2:
grub2::cmdline_linux_extra:
- nomodeset
This would end up in 'vga=normal nomodset' being added to CMDLINE_LINUX.