Files
warewulf/overlays/ignition/rootfs/etc/systemd/system/ignition.swap.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

36 lines
875 B
Plaintext

{{- if .FileSystems }}
{{- range $fsdevice, $fs := .FileSystems }}
{{- if eq $fs.Format "swap" }}
{{ file (print ($fsdevice | SystemdEscapePath) ".swap") }}
# This file is autogenerated by warewulf
[Unit]
ConditionPathExists=/warewulf/ignition.json
Requires=ww-ignition.service
After=ww-ignition.service
Before=swap.target
[Swap]
What={{ $fsdevice }}
[Install]
RequiredBy=swap.target
{{- end }}
{{- end }}
{{- else if .Resources.ignition.storage.filesystems }}
{{- range $fs := .Resources.ignition.storage.filesystems }}
{{- if eq $fs.format "swap" }}
{{ file (print ($fs.device | SystemdEscapePath) ".swap") }}
# This file is autogenerated by warewulf
[Unit]
ConditionPathExists=/warewulf/ignition.json
Requires=ww-ignition.service
After=ww-ignition.service
Before=swap.target
[Swap]
What={{ $fs.device }}
[Install]
RequiredBy=swap.target
{{- end }}
{{- end }}
{{- end }}