Merge pull request #693 from anderbubble/canonical-hostname-first
Emit canonical hostnames first
This commit is contained in:
@@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- The correct header is now displayed when `-al` flags are specified to overlay
|
||||
list.
|
||||
|
||||
### Changed
|
||||
|
||||
- The primary hostname and warewulf server fqdn are now the canonical name in
|
||||
`/etc/hosts`
|
||||
|
||||
## [4.4.0] 2023-01-18
|
||||
|
||||
### Added
|
||||
|
||||
@@ -4,16 +4,14 @@
|
||||
|
||||
|
||||
# Warewulf Server
|
||||
{{$.Ipaddr}} warewulf {{$.BuildHost}}
|
||||
{{$.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}} {{$node.Id.Get}}-{{$devname}}
|
||||
{{- if $netdev.Device.Defined}} {{$node.Id.Get}}-{{$netdev.Device.Get}}{{end}}
|
||||
{{- if $netdev.Primary.GetB}} {{$node.Id.Get}}{{end}}
|
||||
{{- end}} {{/* end if ip */}}
|
||||
{{- end}} {{/* end for each network device */}}
|
||||
{{- end}} {{/* end for each node */}}
|
||||
{{$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 */}}
|
||||
|
||||
@@ -6,16 +6,14 @@
|
||||
|
||||
|
||||
# Warewulf Server
|
||||
{{$.Ipaddr}} warewulf {{$.BuildHost}}
|
||||
{{$.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}} {{$node.Id.Get}}-{{$devname}}
|
||||
{{- if $netdev.Device.Defined}} {{$node.Id.Get}}-{{$netdev.Device.Get}}{{end}}
|
||||
{{- if $netdev.Primary.GetB}} {{$node.Id.Get}}{{end}}
|
||||
{{- end}} {{/* end if ip */}}
|
||||
{{- end}} {{/* end for each network device */}}
|
||||
{{- end}} {{/* end for each node */}}
|
||||
{{$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 */}}
|
||||
|
||||
Reference in New Issue
Block a user