diff --git a/manifests/drivers/pxe.pp b/manifests/drivers/pxe.pp index 412ae469..6e4a0c62 100644 --- a/manifests/drivers/pxe.pp +++ b/manifests/drivers/pxe.pp @@ -89,6 +89,10 @@ # (optional) How often (in seconds) to check for PXE boot status. # Defaults to $::os_service_default. # +# [*ip_version*] +# (optional) The IP version that will be used for PXE booting. +# Defaults to $::os_service_default. +# class ironic::drivers::pxe ( $ipxe_enabled = false, $pxe_append_params = $::os_service_default, @@ -105,6 +109,7 @@ class ironic::drivers::pxe ( $enable_ppc64le = false, $boot_retry_timeout = $::os_service_default, $boot_retry_check_interval = $::os_service_default, + $ip_version = $::os_service_default, ) { include ::ironic::deps @@ -136,6 +141,7 @@ class ironic::drivers::pxe ( 'pxe/ipxe_timeout': value => $ipxe_timeout_real; 'pxe/boot_retry_timeout': value => $boot_retry_timeout; 'pxe/boot_retry_check_interval': value => $boot_retry_check_interval; + 'pxe/ip_version': value => $ip_version; } if $enable_ppc64le { diff --git a/releasenotes/notes/add-pxe-ip-version-param-063ffc9fc7d05eb5.yaml b/releasenotes/notes/add-pxe-ip-version-param-063ffc9fc7d05eb5.yaml new file mode 100644 index 00000000..74f505c9 --- /dev/null +++ b/releasenotes/notes/add-pxe-ip-version-param-063ffc9fc7d05eb5.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + New parameter added for ``[pxe]/ip_version`` in ``ironic::drivers::pxe``. + It is used to set the IP version that will be used for PXE booting. + Bug: `1845746 `_. + diff --git a/spec/classes/ironic_drivers_pxe_spec.rb b/spec/classes/ironic_drivers_pxe_spec.rb index 8db568ba..b874edd0 100644 --- a/spec/classes/ironic_drivers_pxe_spec.rb +++ b/spec/classes/ironic_drivers_pxe_spec.rb @@ -105,6 +105,7 @@ describe 'ironic::drivers::pxe' do :pxe_bootfile_name => 'bootx64', :boot_retry_timeout => 600, :boot_retry_check_interval => 120, + :ip_version => 6, ) end @@ -123,6 +124,7 @@ describe 'ironic::drivers::pxe' do is_expected.to contain_ironic_config('pxe/pxe_bootfile_name').with_value(p[:pxe_bootfile_name]) is_expected.to contain_ironic_config('pxe/boot_retry_timeout').with_value(p[:boot_retry_timeout]) is_expected.to contain_ironic_config('pxe/boot_retry_check_interval').with_value(p[:boot_retry_check_interval]) + is_expected.to contain_ironic_config('pxe/ip_version').with_value(p[:ip_version]) end end