{{- $abort := true }} {{- range $fs := .ThisNode.FileSystemList }} {{- if eq $fs.Format "swap" }} {{- $abort = false }} {{- file (print ($fs.Id | SystemdEscapePath) ".swap") -}} {{ softlink (print "/etc/systemd/system/" ($fs.Id | SystemdEscapePath) ".swap") }} {{- end }} {{- end }} {{- if $abort }} {{ abort }} {{- end }}