Use tags in the dnsmasq for HTTP boot

Use tags in the dnsmasq instead old 'net' method to support
multirack feature.

Change-Id: I05327aad3f2a72b748707ccb2942b70400ae55b4
Related-Bug: #1528186
This commit is contained in:
Maksim Malchuk 2015-12-22 12:03:45 +03:00
parent 10ed2f60c6
commit 39bc263006
2 changed files with 8 additions and 2 deletions

View File

@ -48,6 +48,12 @@ describe 'default' do
it { should contain_file("/etc/dnsmasq.d/#{resource_name}.conf") \
.with_content(/^dhcp-range=#{resource_name}.*#{netmask},120m\n|,boothost,#{admin_network['ipaddress']}\n/)
}
it { should contain_file("/etc/dnsmasq.d/#{resource_name}.conf") \
.with_content(/^dhcp-match=set:ipxe,175$/)
}
it { should contain_file("/etc/dnsmasq.d/#{resource_name}.conf") \
.with_content(/^dhcp-option-force=tag:ipxe,210,http:/)
}
end
end

View File

@ -2,5 +2,5 @@
dhcp-range=<%= @range_name %>,<%= @dhcp_start_address %>,<%= @dhcp_end_address %>,<%= @dhcp_netmask %>,<%= @lease_time %>
dhcp-option=net:<%= @range_name %>,option:router,<%= @dhcp_gateway %>
dhcp-boot=net:<%= @range_name %>,pxelinux.0,boothost,<%= @next_server %>
dhcp-match=ipxe,175
dhcp-option-force=net:ipxe,210,http://<%= @next_server %>/cobbler/boot/
dhcp-match=set:ipxe,175
dhcp-option-force=tag:ipxe,210,http://<%= @next_server %>/cobbler/boot/