diff --git a/internal/pkg/overlay/funcmap.go b/internal/pkg/overlay/funcmap.go index 572fcef3..3cf8e0b1 100644 --- a/internal/pkg/overlay/funcmap.go +++ b/internal/pkg/overlay/funcmap.go @@ -22,7 +22,7 @@ func templateVnfsFileInclude(vnfsname string, filepath string) string { wwlog.Printf(wwlog.DEBUG, "Including VNFS file into template: %s: %s\n", vnfsname, filepath) if vnfsname == "" { - wwlog.Printf(wwlog.WARN, "VNFS not set for template: %s\n", filepath) + wwlog.Printf(wwlog.WARN, "VNFS not set for template import request: %s: %s\n", vnfsname, filepath) return "" } diff --git a/overlays/runtime/default/etc/group.ww b/overlays/runtime/default/etc/group.ww index 84aa7158..ca59dd40 100644 --- a/overlays/runtime/default/etc/group.ww +++ b/overlays/runtime/default/etc/group.ww @@ -1,2 +1,2 @@ -{{IncludeFromVnfs .Vnfs "/etc/group"}} +{{IncludeFromVnfs $.Self.Vnfs "/etc/group"}} {{Include "/etc/group"}} diff --git a/overlays/runtime/default/etc/hosts.ww b/overlays/runtime/default/etc/hosts.ww new file mode 100644 index 00000000..e1549f3f --- /dev/null +++ b/overlays/runtime/default/etc/hosts.ww @@ -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.Fqdn}} +{{- range $devname, $netdev := $node.NetDevs}} +{{- if $netdev.Default}} +{{$netdev.Ipaddr}} {{$node.Fqdn}} +{{- else}} +{{$netdev.Ipaddr}} {{$node.Fqdn}}-{{$devname}} +{{- end}} +{{- end}} +{{end}} diff --git a/overlays/runtime/default/etc/passwd.ww b/overlays/runtime/default/etc/passwd.ww index 37c427c9..bd653b8a 100644 --- a/overlays/runtime/default/etc/passwd.ww +++ b/overlays/runtime/default/etc/passwd.ww @@ -1,3 +1,3 @@ root::0:0:root:/root:/bin/bash -{{IncludeFromVnfs .Vnfs "/etc/passwd"}} +{{IncludeFromVnfs $.Self.Vnfs "/etc/passwd"}} {{Include "/etc/passwd"}} diff --git a/overlays/system/default/etc/hostname.ww b/overlays/system/default/etc/hostname.ww index 783b7f08..c6b7c67e 100644 --- a/overlays/system/default/etc/hostname.ww +++ b/overlays/system/default/etc/hostname.ww @@ -1 +1 @@ -{{.Fqdn}} +{{$.Self.Fqdn}} diff --git a/overlays/system/default/etc/sysconfig/network-scripts/ifcfg-eth0.ww b/overlays/system/default/etc/sysconfig/network-scripts/ifcfg-eth0.ww index 99ec46a8..2a5a9e21 100644 --- a/overlays/system/default/etc/sysconfig/network-scripts/ifcfg-eth0.ww +++ b/overlays/system/default/etc/sysconfig/network-scripts/ifcfg-eth0.ww @@ -1,8 +1,8 @@ DEVICE=eth0 NAME=eth0 -IPADDR={{.Netdev.eth0.Ipaddr}} -NETMASK={{.Netdev.eth0.Netmask}} -GATEWAY={{.Netdev.eth0.Gateway}} -HWADDR={{.Netdev.eth0.Hwaddr}} +IPADDR={{$.Self.Netdev.eth0.Ipaddr}} +NETMASK={{$.Self.Netdev.eth0.Netmask}} +GATEWAY={{$.Self.Netdev.eth0.Gateway}} +HWADDR={{$.Self.Netdev.eth0.Hwaddr}} BOOTPROTO=static ONBOOT=yes diff --git a/overlays/system/default/etc/sysconfig/network.ww b/overlays/system/default/etc/sysconfig/network.ww index e26cc305..c2ce4854 100644 --- a/overlays/system/default/etc/sysconfig/network.ww +++ b/overlays/system/default/etc/sysconfig/network.ww @@ -1,2 +1,2 @@ NETWORKING=yes -HOSTNAME={{.Fqdn}} +HOSTNAME={{$.Self.Fqdn}}