moved dhcpd configuration to host templating
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
# This file is created and was written by a Warewulf template. It is strongly
|
||||
# suggested that you do not edit this file, but rather, edit the template and
|
||||
# recreate this file using Warewulf (wwctl configure dhcp)
|
||||
|
||||
allow booting;
|
||||
allow bootp;
|
||||
ddns-update-style interim;
|
||||
authoritative;
|
||||
|
||||
option space ipxe;
|
||||
|
||||
# Tell iPXE to not wait for ProxyDHCP requests to speed up boot.
|
||||
option ipxe.no-pxedhcp code 176 = unsigned integer 8;
|
||||
option ipxe.no-pxedhcp 1;
|
||||
|
||||
option architecture-type code 93 = unsigned integer 16;
|
||||
|
||||
if exists user-class and option user-class = "iPXE" {
|
||||
filename "http://{{$.Ipaddr}}:{{.Port}}/ipxe/${mac:hexhyp}";
|
||||
} else {
|
||||
if option architecture-type = 00:0B {
|
||||
filename "/warewulf/arm64.efi";
|
||||
# } elsif option architecture-type = 00:0A {
|
||||
# Still need to add this to staticfiles
|
||||
# filename "/warewulf/arm32.efi";
|
||||
} elsif option architecture-type = 00:09 {
|
||||
filename "/warewulf/x86.efi";
|
||||
} elsif option architecture-type = 00:07 {
|
||||
filename "/warewulf/x86.efi";
|
||||
} elsif option architecture-type = 00:06 {
|
||||
filename "/warewulf/i386.efi";
|
||||
} elsif option architecture-type = 00:00 {
|
||||
filename "/warewulf/i386.kpxe";
|
||||
}
|
||||
}
|
||||
|
||||
subnet {{$.Network}} netmask {{$.Netmask}} {
|
||||
max-lease-time 120;
|
||||
range {{$.RangeStart}} {{$.RangeEnd}};
|
||||
next-server {{$.Ipaddr}};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# This file is created and was written by a Warewulf template. It is strongly
|
||||
# suggested that you do not edit this file, but rather, edit the template and
|
||||
# recreate this file using Warewulf (wwctl configure dhcp)
|
||||
|
||||
{{- if .Dhcp.Enabled }}
|
||||
# This file is autogenerated by warewulf
|
||||
# Host: {{.BuildHost}}
|
||||
# Time: {{.BuildTime}}
|
||||
# Source: {{.BuildSource}}
|
||||
allow booting;
|
||||
allow bootp;
|
||||
ddns-update-style interim;
|
||||
@@ -16,7 +17,7 @@ option ipxe.no-pxedhcp 1;
|
||||
option architecture-type code 93 = unsigned integer 16;
|
||||
|
||||
if exists user-class and option user-class = "iPXE" {
|
||||
filename "http://{{$.Ipaddr}}:{{.Port}}/ipxe/${mac:hexhyp}";
|
||||
filename "http://{{$.Ipaddr}}:{{.Warewulf.Port}}/ipxe/${mac:hexhyp}";
|
||||
} else {
|
||||
if option architecture-type = 00:0B {
|
||||
filename "/warewulf/arm64.efi";
|
||||
@@ -44,3 +45,5 @@ host {{$nodes.Id.Get}} {
|
||||
fixed-address {{$nodes.NetDevs.eth0.Ipaddr.Get}};
|
||||
}
|
||||
{{end}}
|
||||
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user