Files
warewulf/etc/hosts.tmpl
2020-12-22 21:51:19 -08:00

14 lines
366 B
Cheetah

{{$.PrevHostFile}}# Do not edit after this line - these host entries are maintained by warewulf
{{range $node := $.AllNodes}}
# Entry for {{$node.Id.Get}}
{{- range $devname, $netdev := $node.NetDevs}}
{{- if $netdev.Default.GetB}}
{{$netdev.Ipaddr.Get}} {{$node.Id.Get}}
{{- else}}
{{$netdev.Ipaddr.Get}} {{$node.Id.Get}}-{{$devname}}
{{- end}}
{{- end}}
{{end}}