Normalize LUKS boot layout and partitioning defaults
This commit is contained in:
@@ -6,9 +6,12 @@
|
||||
configuration_use_efibootmgr: "{{ is_rhel | default(false) }}"
|
||||
configuration_efi_dir: >-
|
||||
{{
|
||||
"/boot/efi"
|
||||
if (is_rhel | default(false)) or (os | lower in ["ubuntu", "ubuntu-lts"])
|
||||
else "/boot"
|
||||
partitioning_efi_mountpoint
|
||||
| default(
|
||||
"/boot/efi"
|
||||
if (is_rhel | default(false)) or (os | lower in ["ubuntu", "ubuntu-lts"])
|
||||
else "/boot"
|
||||
)
|
||||
}}
|
||||
configuration_bootloader_id: >-
|
||||
{{ "ubuntu" if os | lower in ["ubuntu", "ubuntu-lts"] else os }}
|
||||
@@ -57,13 +60,12 @@
|
||||
configuration_efi_vendor: >-
|
||||
{{ "redhat" if os | lower in ["rhel8", "rhel9", "rhel10"] else os | lower }}
|
||||
configuration_grub_cfg_cmd: >-
|
||||
{{ '/usr/sbin/grub2-mkconfig -o /boot/efi/EFI/' + configuration_efi_vendor + '/grub.cfg'
|
||||
if is_rhel | default(false)
|
||||
else '/usr/sbin/grub-mkconfig -o ' + (
|
||||
'/boot/efi/EFI/ubuntu/grub.cfg'
|
||||
if os | lower in ["ubuntu", "ubuntu-lts"]
|
||||
else '/boot/grub/grub.cfg'
|
||||
)
|
||||
{{
|
||||
'/usr/sbin/grub2-mkconfig -o '
|
||||
+ (partitioning_efi_mountpoint | default('/boot/efi'))
|
||||
+ '/EFI/' + configuration_efi_vendor + '/grub.cfg'
|
||||
if is_rhel | default(false)
|
||||
else '/usr/sbin/grub-mkconfig -o /boot/grub/grub.cfg'
|
||||
}}
|
||||
ansible.builtin.command: "arch-chroot /mnt {{ configuration_grub_cfg_cmd }}"
|
||||
register: configuration_grub_result
|
||||
|
||||
Reference in New Issue
Block a user