refactor(vars): simplify normalization and remove effective intermediates

This commit is contained in:
2026-02-11 05:37:18 +01:00
parent 04727033f1
commit b8c672507f
9 changed files with 267 additions and 409 deletions

View File

@@ -114,7 +114,7 @@ partitioning_root_device: >-
if (partitioning_luks_enabled | bool)
else install_drive ~ (partitioning_root_partition_suffix | string)
}}
partitioning_vm_size_effective: >-
partitioning_disk_size_gb: >-
{{
(
partitioning_vm_size
@@ -129,7 +129,7 @@ partitioning_vm_size_effective: >-
)
| float
}}
partitioning_vm_memory_effective: >-
partitioning_memory_mb: >-
{{
(
partitioning_vm_memory
@@ -143,9 +143,9 @@ partitioning_vm_memory_effective: >-
}}
partitioning_swap_size_gb: >-
{{
((partitioning_vm_memory_effective / 1024) >= 16.0)
((partitioning_memory_mb / 1024) >= 16.0)
| ternary(
(partitioning_vm_memory_effective / 2048) | int,
[partitioning_vm_memory_effective / 1024, 4.0] | max | int
(partitioning_memory_mb / 2048) | int,
[partitioning_memory_mb / 1024, 4.0] | max | int
)
}}