Add an option to specify the tftp bind host IP
Change-Id: Iea204fe993ecc9e3a273491c083e06a78ee0e19d
This commit is contained in:
parent
e4fcf84bdf
commit
c0122b7494
@ -43,6 +43,10 @@
|
||||
# (optional) Array of PXE boot files to copy from $syslinux_path to $tftp_root.
|
||||
# Defaults to '$::ironic::params::syslinux_files'
|
||||
#
|
||||
# [*tftp_bind_host*]
|
||||
# (optional) The IP address xinetd will listen on for TFTP.
|
||||
# Defaults to undef (listen on all ip addresses).
|
||||
#
|
||||
class ironic::pxe (
|
||||
$package_ensure = 'present',
|
||||
$tftp_root = '/tftpboot',
|
||||
@ -50,6 +54,7 @@ class ironic::pxe (
|
||||
$http_port = '8088',
|
||||
$syslinux_path = $::ironic::params::syslinux_path,
|
||||
$syslinux_files = $::ironic::params::syslinux_files,
|
||||
$tftp_bind_host = undef,
|
||||
) inherits ::ironic::params {
|
||||
|
||||
include ::ironic::deps
|
||||
@ -101,6 +106,7 @@ class ironic::pxe (
|
||||
|
||||
xinetd::service { 'tftp':
|
||||
port => '69',
|
||||
bind => $tftp_bind_host,
|
||||
protocol => 'udp',
|
||||
server_args => "${options} ${tftp_root_real}",
|
||||
server => '/usr/sbin/in.tftpd',
|
||||
|
4
releasenotes/notes/tftp-bind-ip-0a042cd836dd53f9.yaml
Normal file
4
releasenotes/notes/tftp-bind-ip-0a042cd836dd53f9.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- New option "tftp_bind_host" added to specify
|
||||
IP address TFTP will bind too
|
@ -76,6 +76,7 @@ describe 'ironic::pxe' do
|
||||
:tftp_root => '/var/lib/tftpboot',
|
||||
:http_root => '/var/www/httpboot',
|
||||
:http_port => 3816,
|
||||
:tftp_bind_host => '1.2.3.4',
|
||||
)
|
||||
end
|
||||
|
||||
@ -119,6 +120,11 @@ describe 'ironic::pxe' do
|
||||
'backup' => false,
|
||||
)
|
||||
end
|
||||
it 'should setup tftp xinetd service' do
|
||||
is_expected.to contain_xinetd__service('tftp').with(
|
||||
'bind' => '1.2.3.4',
|
||||
)
|
||||
end
|
||||
end
|
||||
context 'when excluding syslinux' do
|
||||
before :each do
|
||||
|
Loading…
x
Reference in New Issue
Block a user