Files
warewulf/overlays/ignition/rootfs/etc/systemd/system/ignition.mount.ww
Jonathon Anderson 44eeba13f7 Rename systemd templates in the ignition overlay for clarity
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-01-06 21:02:15 -07:00

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 }}