diff --git a/manifests/tftp/netboot.pp b/manifests/tftp/netboot.pp index 5074a14e..d52b1fde 100644 --- a/manifests/tftp/netboot.pp +++ b/manifests/tftp/netboot.pp @@ -7,6 +7,12 @@ ) inherits foreman_proxy::tftp::netboot::params { ensure_packages($packages, { ensure => 'present', }) + # The symlink from grub2/boot to boot is needed for UEFI HTTP boot + file {"${root}/grub2/boot": + ensure => 'link', + target => '../boot', + } + case $grub_installation_type { 'redhat_exec': { $efi_lib_dir = '/usr/lib/grub/x86_64-efi' diff --git a/spec/classes/foreman_proxy__tftp__netboot_spec.rb b/spec/classes/foreman_proxy__tftp__netboot_spec.rb index feb21da9..659bd532 100644 --- a/spec/classes/foreman_proxy__tftp__netboot_spec.rb +++ b/spec/classes/foreman_proxy__tftp__netboot_spec.rb @@ -12,6 +12,11 @@ end it { is_expected.to compile.with_all_deps } + + it 'should create grub2 boot symlink' do + should contain_file("/tftproot/grub2/boot"). + with_ensure('link').with_target("../boot") + end end end end