From 0e78daf80d4406c5f01a51be270b9f0a5555e8cc Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 11 Dec 2023 22:26:17 +0900 Subject: [PATCH] Simplify logic to locate efi/shim file ... using the operating system name. This may allow the module to work with untested distributions such as Rocky. Change-Id: Idd73ccd4d5366ccbb9373d7e3bfcba120fc238bb --- manifests/params.pp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index cd8494f9..b36da503 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -73,17 +73,9 @@ class ironic::params { $syslinux_path = '/tftpboot' $syslinux_files = ['pxelinux.0', 'chain.c32', 'ldlinux.c32'] $grub_efi_package = 'grub2-efi-x64' + $grub_efi_file = "/boot/efi/EFI/${downcase($facts['os']['name'])}/grubx64.efi" $shim_package = 'shim' - case $facts['os']['name'] { - 'RedHat': { - $grub_efi_file = '/boot/efi/EFI/redhat/grubx64.efi' - $shim_file = '/boot/efi/EFI/redhat/shimx64.efi' - } - default: { - $grub_efi_file = '/boot/efi/EFI/centos/grubx64.efi' - $shim_file = '/boot/efi/EFI/centos/shimx64.efi' - } - } + $shim_file = "/boot/efi/EFI/${downcase($facts['os']['name'])}/shimx64.efi" } 'Debian': { $common_package_name = 'ironic-common'