- sfdisk - partitions the disk - mkfs - formats partitions - mkswap - formats partitions for swap - systemd.mount - explicit creation of systemd mount units - systemd.swap - explicit creation of systemd swap units Signed-off-by: Jonathon Anderson <janderson@ciq.com>
20 lines
329 B
Plaintext
20 lines
329 B
Plaintext
{{- $abort := true }}
|
|
{{- range $fs := .ThisNode.FileSystemList }}
|
|
{{- if eq $fs.Format "swap" }}
|
|
{{- $abort = false }}
|
|
{{ file (print ($fs.Id | SystemdEscapePath) ".swap") }}
|
|
|
|
[Unit]
|
|
Before=swap.target
|
|
|
|
[Swap]
|
|
What={{ $fs.Id }}
|
|
|
|
[Install]
|
|
RequiredBy=swap.target
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $abort }}
|
|
{{ abort }}
|
|
{{- end }}
|