create fstab from resource
Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
07c77a63d5
commit
77bdfba816
@@ -12,12 +12,11 @@ proc /proc proc defaults 0 0
|
||||
{{- if $fs.MountOptions }} noauto{{range $index,$opt := $fs.MountOptions }},{{ $opt }}{{ end }} 0 0
|
||||
{{- else }} noauto,defaults 0 0
|
||||
{{- end }}{{ end }}{{ end }}
|
||||
{{- $IP:=.Ipaddr }}
|
||||
{{- if .Nfs.Enabled }}
|
||||
# nfs mounts provided in warewulf.conf
|
||||
{{- range .Nfs.ExportsExtended }}
|
||||
{{- if .Mount }}
|
||||
{{ $IP }}:{{ .Path }} {{ .Path }} nfs {{ .MountOptions }} 0 0
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $Resource := .Resource }}{{ $server := .Ipaddr}}{{/* export the needed values */}}
|
||||
{{- range $i,$ResName := .ResourceList }}
|
||||
{{- if eq (substr 0 3 $ResName) "NFS" }}{{ $nfs := (index $Resource $ResName)}}
|
||||
# Resource: {{ $ResName }}
|
||||
{{- if not (eq $nfs.server "controller") }}{{ $server = $nfs.server }}{{ end }}
|
||||
{{ $server }}:{{ $nfs.epath}} {{ $nfs.mountpoint }} nfs {{ $nfs.moptions }} 0 0
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user