diff options
Diffstat (limited to 'roles/installer/debian/preseed/templates/partman_config.j2')
-rw-r--r-- | roles/installer/debian/preseed/templates/partman_config.j2 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/roles/installer/debian/preseed/templates/partman_config.j2 b/roles/installer/debian/preseed/templates/partman_config.j2 index 88b6a088..ca6feb41 100644 --- a/roles/installer/debian/preseed/templates/partman_config.j2 +++ b/roles/installer/debian/preseed/templates/partman_config.j2 @@ -52,10 +52,22 @@ d-i partman-auto/expert_recipe string $lvmignore{ } $primary{ } $bootable{ } \ method{ raid } \ . \ - 10240 10340 -1 raid \ +{% if 'root_lvm_size' in hostvars[install_hostname].install_cooked.disks and hostvars[install_hostname].install_cooked.disks.root_lvm_size != 'all' %} +{% set root_lvm_size = ((hostvars[install_hostname].install_cooked.disks.root_lvm_size | human_to_bytes) / (1024*1024)) | int %} + {{ root_lvm_size }} {{ root_lvm_size }} {{ root_lvm_size }} raid \ $lvmignore{ } $primary{ } \ method{ raid } \ . \ + 8 108 -1 ext4 \ + $lvmignore{ } $primary{ } \ + method{ unused } \ + . \ +{% else %} + 5120 5120 5120 raid \ + $lvmignore{ } $primary{ } \ + method{ raid } \ + . \ +{% endif %} {% else %} {% if 'root_lvm_size' in hostvars[install_hostname].install_cooked.disks and hostvars[install_hostname].install_cooked.disks.root_lvm_size != 'all' %} {% set root_lvm_size = ((hostvars[install_hostname].install_cooked.disks.root_lvm_size | human_to_bytes) / (1024*1024)) | int %} |