18 lines
437 B
YAML
18 lines
437 B
YAML
---
|
|
- name: UEFI Check
|
|
ansible.builtin.stat:
|
|
path: /boot/efi/EFI/redhat/grub.cfg
|
|
register: is_efi
|
|
|
|
- name: Rebuild Grub config - BIOS
|
|
ansible.builtin.command:
|
|
cmd: "grub2-mkconfig -o /boot/grub2/grub.cfg"
|
|
when:
|
|
- not is_efi['stat']['exists'] | bool
|
|
|
|
- name: Rebuild Grub config - UEFI
|
|
ansible.builtin.command:
|
|
cmd: "grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg"
|
|
when:
|
|
- is_efi['stat']['exists'] | bool
|