- Control root device using the node/profile root field - Add support for `/warewulf/wwinit.d` to run scripts during first stage - Move first-stage ignition support to `/warewulf/wwinit.d/` - Add `wwctl <node|profile> set --parttype` - Add overlay template functions `SystemdEscape` and `SystemdEscapePath` - Support configuring ignition with resources Signed-off-by: Jonathon Anderson <janderson@ciq.com>
76 lines
1.8 KiB
Plaintext
76 lines
1.8 KiB
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=ignition-ww4-disks.service
|
|
After=ignition-ww4-disks.service
|
|
Before=swap.target
|
|
[Swap]
|
|
What={{ $fsdevice }}
|
|
[Install]
|
|
RequiredBy=swap.target
|
|
{{- else 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=ignition-ww4-disks.service
|
|
After=ignition-ww4-disks.service
|
|
[Mount]
|
|
Where={{ $fs.Path }}
|
|
What={{ $fsdevice }}
|
|
Type={{ $fs.Format }}
|
|
{{- if $fs.MountOptions }}
|
|
Options={{ $fs.MountOptions | join "." }}
|
|
{{- end }}
|
|
[Install]
|
|
RequiredBy=local-fs.target
|
|
{{- else }}
|
|
{{- continue }}
|
|
{{- 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=ignition-ww4-disks.service
|
|
After=ignition-ww4-disks.service
|
|
Before=swap.target
|
|
[Swap]
|
|
What={{ $fs.device }}
|
|
[Install]
|
|
RequiredBy=swap.target
|
|
{{- else 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=ignition-ww4-disks.service
|
|
After=ignition-ww4-disks.service
|
|
[Mount]
|
|
Where={{ $fs.path }}
|
|
What={{ $fs.device }}
|
|
Type={{ $fs.format }}
|
|
{{- if $fs.mountOptions }}
|
|
Options={{ $fs.mountOptions | join "." }}
|
|
{{- end }}
|
|
[Install]
|
|
RequiredBy=local-fs.target
|
|
{{- else }}
|
|
{{- continue }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|