Skip to content

Commit d76868e

Browse files
evgeniekohl
authored andcommitted
require the grub packages before copying files on RedHat too
this was done on Debian-family systems already, but not on RedHat, resulting in "double" errors if the package could not be installed: /Stage[main]/Foreman_proxy::Tftp::Netboot/Package[grub2-efi-x64]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/dnf -d 0 -e 1 -y install grub2-efi-x64' returned 1: Error: Unable to find a match: grub2-efi-x64 /Stage[main]/Foreman_proxy::Tftp::Netboot/File[/var/lib/tftpboot/grub2/grubx64.efi]: Could not evaluate: Could not retrieve information from environment production source(s) file:///boot/efi/EFI/redhat/grubx64.efi
1 parent 7eec0d4 commit d76868e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

manifests/tftp/netboot.pp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@
3434
}
3535

3636
file { "${root}/grub2/grubx64.efi":
37-
ensure => file,
38-
source => "/boot/efi/EFI/${grub_efi_path}/grubx64.efi",
37+
ensure => file,
38+
source => "/boot/efi/EFI/${grub_efi_path}/grubx64.efi",
39+
require => Package[$packages],
3940
}
4041

4142
file { "${root}/grub2/shimx64.efi":
42-
ensure => file,
43-
source => "/boot/efi/EFI/${grub_efi_path}/shimx64.efi",
44-
mode => '0644',
45-
owner => 'root',
43+
ensure => file,
44+
source => "/boot/efi/EFI/${grub_efi_path}/shimx64.efi",
45+
mode => '0644',
46+
owner => 'root',
47+
require => Package[$packages],
4648
}
4749

4850
file { "${root}/grub2/shim.efi":

0 commit comments

Comments
 (0)