diff --git a/manifests/init.pp b/manifests/init.pp index ad86ce3f..ab0aa1bd 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -111,6 +111,8 @@ # # $tftp_replace_grub2_cfg:: Determines if grub2.cfg will be replaced # +# $tftp_bootloader_universe:: Directory for OS specific Network Bootstrap Programs for "Grub2 UEFI" PXE loaders +# # $dhcp:: Enable DHCP feature # # $dhcp_listen_on:: DHCP proxy to listen on https, http, or both @@ -341,6 +343,7 @@ Optional[Array[Stdlib::Absolutepath]] $tftp_dirs = undef, Optional[String] $tftp_servername = undef, Boolean $tftp_replace_grub2_cfg = false, + Optional[Stdlib::Absolutepath] $tftp_bootloader_universe = undef, Boolean $dhcp = false, Foreman_proxy::ListenOn $dhcp_listen_on = 'https', Boolean $dhcp_managed = true, diff --git a/manifests/module/tftp.pp b/manifests/module/tftp.pp index dfaccf91..3642cf05 100644 --- a/manifests/module/tftp.pp +++ b/manifests/module/tftp.pp @@ -8,10 +8,14 @@ # # @param tftproot # The root directory to use. This is required if the module is enabled. +# +# @param tftp_bootloader_universe +# Directory for OS specific Network Bootstrap Programs for "Grub2 UEFI" PXE loaders. class foreman_proxy::module::tftp ( Boolean $enabled = $foreman_proxy::tftp, Foreman_proxy::ListenOn $listen_on = $foreman_proxy::tftp_listen_on, Optional[Stdlib::Absolutepath] $tftproot = $foreman_proxy::tftp_root, + Optional[Stdlib::Absolutepath] $tftp_bootloader_universe = $foreman_proxy::tftp_bootloader_universe, ) { if $enabled { assert_type(NotUndef, $tftproot) diff --git a/manifests/tftp.pp b/manifests/tftp.pp index 90234457..9c6e68db 100644 --- a/manifests/tftp.pp +++ b/manifests/tftp.pp @@ -8,12 +8,13 @@ Boolean $manage_wget = $foreman_proxy::tftp_manage_wget, String[1] $wget_version = $foreman_proxy::ensure_packages_version, Boolean $tftp_replace_grub2_cfg = $foreman_proxy::tftp_replace_grub2_cfg, + Optional[Stdlib::Absolutepath] $tftp_bootloader_universe = $foreman_proxy::tftp_bootloader_universe, ) { class { 'tftp': root => $root, } - $dirs = pick($directories, prefix(['pxelinux.cfg','grub','grub2','boot','ztp.cfg','poap.cfg'], "${tftp::root}/")) + $dirs = pick($directories, prefix(['pxelinux.cfg','grub','grub2','boot','ztp.cfg','poap.cfg', 'host_config'], "${tftp::root}/")) file { $dirs: ensure => directory, diff --git a/templates/tftp.yml.erb b/templates/tftp.yml.erb index 0cfa7c21..ed3e2150 100644 --- a/templates/tftp.yml.erb +++ b/templates/tftp.yml.erb @@ -13,3 +13,6 @@ # Defines the default certificate action for certificate checking. # When false, the argument --no-check-certificate will be used. #:verify_server_cert: true + +# Directory for OS specific Network Bootstrap Programs for "Grub2 UEFI" PXE loaders +<%= '#' if [nil, :undefined, :undef].include?(scope.lookupvar("foreman_proxy::module::tftp::tftp_bootloader_universe")) %>:bootloader_universe: <%= scope.lookupvar("foreman_proxy::module::tftp::tftp_bootloader_universe") %>