Add ability to configure host file on the controller node
This commit is contained in:
14
etc/hosts.tmpl
Normal file
14
etc/hosts.tmpl
Normal file
@@ -0,0 +1,14 @@
|
||||
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
|
||||
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
|
||||
|
||||
|
||||
{{range $node := $.AllNodes}}
|
||||
# Entry for {{$node.Id.Get}}
|
||||
{{- range $devname, $netdev := $node.NetDevs}}
|
||||
{{- if $netdev.Default}}
|
||||
{{$netdev.Ipaddr.Get}} {{$node.Id.Get}}
|
||||
{{- else}}
|
||||
{{$netdev.Ipaddr.Get}} {{$node.Id.Get}}-{{$devname}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user