Add WWbool.BoolDefaultTrue()
New support in WWbool for booleans that default "true." Used primarily for NetDev.OnBoot. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -54,6 +54,7 @@ writeFile: true
|
||||
Filename: default
|
||||
|
||||
# This file is autogenerated by warewulf
|
||||
auto wwnet0
|
||||
allow-hotplug wwnet0
|
||||
iface wwnet0 inet static
|
||||
address 192.168.3.21
|
||||
@@ -65,6 +66,7 @@ backupFile: true
|
||||
writeFile: true
|
||||
Filename: secondary
|
||||
# This file is autogenerated by warewulf
|
||||
auto wwnet1
|
||||
allow-hotplug wwnet1
|
||||
iface wwnet1 inet static
|
||||
address 192.168.3.22
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{- range $devname, $netdev := .ThisNode.NetDevs }}
|
||||
{{ file $devname }}
|
||||
# This file is autogenerated by warewulf
|
||||
{{- if $netdev.OnBoot }}
|
||||
{{- if $netdev.OnBoot.BoolDefaultTrue }}
|
||||
auto {{ $netdev.Device }}
|
||||
{{- end }}
|
||||
allow-hotplug {{ $netdev.Device }}
|
||||
|
||||
Reference in New Issue
Block a user