Files
warewulf/overlays/host/rootfs/etc/hosts.ww
Jonathon Anderson 053dd9953a 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>
2024-09-26 10:48:38 -06:00

17 lines
785 B
Plaintext

{{ IncludeBlock "/etc/hosts" "# Do not edit after this line" }}
# This block is autogenerated by warewulf
# Warewulf Server
{{$.Ipaddr}} {{$.BuildHost}} warewulf
{{- range $node := $.AllNodes }}{{/* for each node */}}
# Entry for {{ $node.Id.Get }}
{{- 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 */}}
{{- /* emit the node name as hostname if this is the primary */}}
{{$netdev.Ipaddr.Get}} {{if $netdev.Primary.GetB}}{{$node.Id.Get}}{{end}} {{$node.Id.Get}}-{{$devname}} {{if $netdev.Device.Defined}}{{$node.Id.Get}}-{{$netdev.Device.Get}}{{end}}
{{- end }}{{/* if ip */}}
{{- end }}{{/* for each network device */}}
{{- end }}{{/* for each node */}}