# Role: grub

## Description

Installs and configures grub bootloader.

https://www.gnu.org/software/grub/

## Usage

Using in a playbook:

```yaml
- name: Play
  hosts:
    - all
  roles:
    - samuliy.ansible.grub
  vars:
    ...
```

### Vars

`grub_cmdline`:

List of values in Grub cmdline.

`grub_cmdline_default`:

List of values in Grub default cmdline.

`grub_distributor`:

Value for GRUB_DISTRIBUTOR.

`grub_timeout`:

Value for GRUB_TIMEOUT.

`grub_timeout_style`:

Value for GRUB_TIMEOUT_STYLE.

`grub_efi_dir`:

Directory that is mounted as the EFI partition.

`grub_install`:

Install Grub.

`grub_shim`:

Install Grub via Shim.

`grub_cfg`:

Path to Grub config.

`grub_shim_efibootmgr_label`:

Label to use when registering Shim with efibootmgr.

`grub_shim_secureboot_mok_certs`:

Certs to import with mokutil.

`grub_efibootmgr_bin`:

Path to efibootmgr.

`grub_mokutil_password`:

Password to use when importing certs via mokutil.

`grub_mokutil_bin`:

Path to mokutil.

`grub_openssl_bin`:

Path to openssl.

`grub_efibootmgr_extra_args`:

Extra args for efibootmgr.

`grub_shim_disk_device`:

Device to use when registering via efibootmgr.

`grub_shim_disk_loader_partition`:

Partition containing loader on the disk to use with efibootmg to use with efibootmgr.
