Merge pull request #727 from hpcng/dnsmasq
added experimental dnsmasq support
This commit is contained in:
30
overlays/host/dnsmasq.d/ww4-hosts.conf.ww
Normal file
30
overlays/host/dnsmasq.d/ww4-hosts.conf.ww
Normal file
@@ -0,0 +1,30 @@
|
||||
# This file was autgenerated by warewulf
|
||||
# Host: {{.BuildHost}}
|
||||
# Time: {{.BuildTime}}
|
||||
# Source {{.BuildSource}}
|
||||
{{ nobackup }}
|
||||
# select the x86 hosts which will get the iXPE binary
|
||||
dhcp-match=set:x86PC,option:client-arch, 7 #EFI x86-64
|
||||
dhcp-match=set:x86PC,option:client-arch, 6 #EFI x86-64
|
||||
dhcp-match=set:x86PC,option:client-arch, 9 #EFI x86-64
|
||||
{{ with (index $.Tftp.IpxeBinaries "00:07" ) }}dhcp-boot=tag:x86PC,"/warewulf/{{ index $.Tftp.IpxeBinaries "00:07" }}"{{ end }}
|
||||
dhcp-no-override
|
||||
# iPXE binary will get the following configuration file
|
||||
dhcp-userclass=set:iPXE,iPXE
|
||||
dhcp-boot=tag:iPXE,"http://{{$.Ipaddr}}:{{$.Warewulf.Port}}/ipxe/${mac:hexhyp}"
|
||||
{{- if $.Tftp.Enabled }}
|
||||
# also act as tftp server
|
||||
tftp-root={{ $.Tftp.TftpRoot }}
|
||||
{{- end }}
|
||||
# define the the range
|
||||
dhcp-range={{$.Dhcp.RangeStart}},{{$.Dhcp.RangeEnd}},{{$.Netmask}},6h
|
||||
{{/* Add all the known hosts */}}
|
||||
{{- range $node := $.AllNodes}} {{/* for each node */}}
|
||||
{{- range $devname, $netdev := $node.NetDevs}} {{/* for each network device on the node */}}
|
||||
{{- if $netdev.Ipaddr.Defined}} {{/* if we have an ip address on this network device */}}
|
||||
{{- if $netdev.Hwaddr.Defined }}
|
||||
dhcp-host={{$netdev.Hwaddr.Get}},set:warewulf,{{$node.Id.Get}},{{$netdev.Ipaddr.Get}},infinite
|
||||
{{- end}} {{/* end if Hwaddr */}}
|
||||
{{- end}} {{/* end if ip */}}
|
||||
{{- end}} {{/* end for each network device */}}
|
||||
{{- end}} {{/* end for each node */}}
|
||||
Reference in New Issue
Block a user