50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
{{- if .FileSystems }}
|
|
{{- range $fsdevice, $fs := .FileSystems }}
|
|
{{- if ne $fs.Format "swap" }}
|
|
{{- if ne $fs.Path "" }}
|
|
{{ file (print ($fs.Path | SystemdEscapePath) ".mount") }}
|
|
# This file is autogenerated by warewulf
|
|
|
|
[Unit]
|
|
ConditionPathExists=/warewulf/ignition.json
|
|
Before=local-fs.target
|
|
Requires=ww-ignition.service
|
|
After=ww-ignition.service
|
|
[Mount]
|
|
Where={{ $fs.Path }}
|
|
What={{ $fsdevice }}
|
|
Type={{ $fs.Format }}
|
|
{{- if $fs.MountOptions }}
|
|
Options={{ $fs.MountOptions }}
|
|
{{- end }}
|
|
[Install]
|
|
RequiredBy=local-fs.target
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- else if .Resources.ignition.storage.filesystems }}
|
|
{{- range $fs := .Resources.ignition.storage.filesystems }}
|
|
{{- if ne $fs.format "swap" }}
|
|
{{- if ne $fs.path "" }}
|
|
{{ file (print ($fs.path | SystemdEscapePath) ".mount") }}
|
|
# This file is autogenerated by warewulf
|
|
|
|
[Unit]
|
|
ConditionPathExists=/warewulf/ignition.json
|
|
Before=local-fs.target
|
|
Requires=ww-ignition.service
|
|
After=ww-ignition.service
|
|
[Mount]
|
|
Where={{ $fs.path }}
|
|
What={{ $fs.device }}
|
|
Type={{ $fs.format }}
|
|
{{- if $fs.mountOptions }}
|
|
Options={{ $fs.mountOptions | join "." }}
|
|
{{- end }}
|
|
[Install]
|
|
RequiredBy=local-fs.target
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|