Split overlays into discrete functionality and test

- Closes #987

To make the overlays testable in isolation, and after discussion with
the TSC, removed host/time/source from overlay files.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-07-15 16:27:49 -06:00
parent b150b6319e
commit 053dd9953a
109 changed files with 3581 additions and 232 deletions

View File

@@ -0,0 +1,40 @@
{{range $devname, $netdev := .NetDevs -}}
{{- $filename := print "ifcfg-" $devname ".conf" }}
{{- file $filename }}
# This file is autogenerated by warewulf
TYPE={{ $netdev.Type }}
DEVICE={{ $netdev.Device }}
NAME={{ $devname }}
{{ if $netdev.MTU -}}
MTU={{ $netdev.MTU }}
{{ end -}}
BOOTPROTO=static
DEVTIMEOUT=10
IPADDR={{ $netdev.Ipaddr }}
NETMASK={{ $netdev.Netmask }}
{{ if $netdev.Gateway -}}
GATEWAY={{ $netdev.Gateway }}
{{ end -}}
{{ if $netdev.Hwaddr -}}
HWADDR={{ $netdev.Hwaddr }}
{{ end -}}
{{ if $netdev.Type -}}
TYPE={{ $netdev.Type }}
{{ end -}}
{{ if $netdev.OnBoot -}}
ONBOOT={{ $netdev.OnBoot }}
{{ end -}}
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
{{ if $netdev.Ipaddr6 -}}
IPV6ADDR="{{ $netdev.Ipaddr6 }}"
{{ end -}}
{{range $tk, $tv := $netdev.Tags -}}
{{ $prefix := substr 0 3 $tk -}}
{{ if eq $prefix "DNS" -}}
{{ $tk }}={{ $tv }}
{{ end -}}
{{ end -}}
{{ end -}}