summaryrefslogtreecommitdiff
path: root/roles/installer/debian/preseed/templates/partman_config.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer/debian/preseed/templates/partman_config.j2')
-rw-r--r--roles/installer/debian/preseed/templates/partman_config.j228
1 files changed, 14 insertions, 14 deletions
diff --git a/roles/installer/debian/preseed/templates/partman_config.j2 b/roles/installer/debian/preseed/templates/partman_config.j2
index 975c2fe5..9f8c7dcd 100644
--- a/roles/installer/debian/preseed/templates/partman_config.j2
+++ b/roles/installer/debian/preseed/templates/partman_config.j2
@@ -11,11 +11,11 @@ d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto/purge_lvm_from_device boolean true
-d-i partman-auto-lvm/new_vg_name string {{ hostvars[install_hostname].host_name }}
+d-i partman-auto-lvm/new_vg_name string {{ host_name }}
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/no_boot boolean true
-{% if (hostvars[install_hostname].install_cooked.efi | default(false)) %}
+{% if (install_cooked.efi | default(false)) %}
d-i partman-efi/non_efi_system boolean true
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
@@ -32,30 +32,30 @@ d-i partman-basicfilesystems/choose_label string msdos
d-i partman-basicfilesystems/default_label string msdos
{% endif %}
-{% set system_lvm_size = hostvars[install_hostname].install_cooked.system_lvm.size | default(preseed_system_lvm_size_default) %}
-{% set system_lvm_volumes = hostvars[install_hostname].install_cooked.system_lvm.volumes | default(preseed_system_lvm_volumes_default) %}
+{% set system_lvm_size = install_cooked.system_lvm.size | default(preseed_system_lvm_size_default) %}
+{% set system_lvm_volumes = install_cooked.system_lvm.volumes | default(preseed_system_lvm_volumes_default) %}
{# on small disks this probably triggers: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896826 ... #}
-{# set system_lvm_reserve = hostvars[install_hostname].install_cooked.system_lvm.reserve | default(preseed_system_lvm_reserve_default) #}
+{# set system_lvm_reserve = install_cooked.system_lvm.reserve | default(preseed_system_lvm_reserve_default) #}
{# set system_lvm_pv_size_min_mb = (((system_lvm_volumes | map(attribute='size') | map('human_to_bytes') | sum) / (1024*1024)) | int) + (((system_lvm_reserve | human_to_bytes) / (1024*1024)) | int) #}
{# ... so let's go for a 1 MB minimum. #}
{% set system_lvm_pv_size_min_mb = 1 %}
-{% if hostvars[install_hostname].install_cooked.disks.primary == "software-raid" %}
+{% if install_cooked.disks.primary == "software-raid" %}
d-i partman-auto/method string raid
{% else %}
d-i partman-auto/method string lvm
{% endif %}
d-i partman-auto/expert_recipe string \
ansible :: \
-{% if (hostvars[install_hostname].install_cooked.efi | default(false)) %}
-{% set efi_esp_size_mb = (((hostvars[install_hostname].preseed_efi_esp_size | default(preseed_efi_esp_size)) | human_to_bytes) / (1024*1024)) | int %}
+{% if (install_cooked.efi | default(false)) %}
+{% set efi_esp_size_mb = (((preseed_efi_esp_size | default(preseed_efi_esp_size)) | human_to_bytes) / (1024*1024)) | int %}
{{ efi_esp_size_mb }} {{ efi_esp_size_mb }} {{ efi_esp_size_mb }} fat16 \
$primary{ } $bootable{ } \
method{ efi } format{ } \
. \
{% endif %}
-{% if hostvars[install_hostname].install_cooked.disks.primary == "software-raid" %}
-{% set swraid_boot_size_mb = (((hostvars[install_hostname].preseed_swraid_boot_size | default(preseed_swraid_boot_size)) | human_to_bytes) / (1024*1024)) | int %}
+{% if install_cooked.disks.primary == "software-raid" %}
+{% set swraid_boot_size_mb = (((preseed_swraid_boot_size | default(preseed_swraid_boot_size)) | human_to_bytes) / (1024*1024)) | int %}
{{ swraid_boot_size_mb }} {{ swraid_boot_size_mb }} {{ swraid_boot_size_mb }} raid \
$lvmignore{ } $primary{ } $bootable{ } \
method{ raid } \
@@ -82,7 +82,7 @@ d-i partman-auto/expert_recipe string
{% set system_lvm_size_mb = ((system_lvm_size | human_to_bytes) / (1024*1024)) | int %}
{{ system_lvm_size_mb }} {{ system_lvm_size_mb }} {{ system_lvm_size_mb }} lvm \
$defaultignore{ } $primary{ } \
- method{ lvm } vg_name{ {{ hostvars[install_hostname].host_name }} } \
+ method{ lvm } vg_name{ {{ host_name }} } \
. \
1 101 -1 ext4 \
$defaultignore{ } $primary{ } \
@@ -91,7 +91,7 @@ d-i partman-auto/expert_recipe string
{% else %}
{{ system_lvm_pv_size_min_mb }} {{ system_lvm_pv_size_min_mb + 100 }} -1 lvm \
$defaultignore{ } $primary{ } \
- method{ lvm } vg_name{ {{ hostvars[install_hostname].host_name }} } \
+ method{ lvm } vg_name{ {{ host_name }} } \
. \
{% endif %}
{% endif %}
@@ -99,7 +99,7 @@ d-i partman-auto/expert_recipe string
{% set volume_size = ((volume.size | human_to_bytes) / (1024*1024)) | int %}
{{ volume_size }} {{ volume_size }} {{ volume_size }} {{ volume.filesystem }} \
$defaultignore{ } $lvmok{ } \
- in_vg{ {{ hostvars[install_hostname].host_name }} } lv_name{ {{ volume.name }} } \
+ in_vg{ {{ host_name }} } lv_name{ {{ volume.name }} } \
method{ format } format{ } \
use_filesystem{ } filesystem{ {{ volume.filesystem }} } \
mountpoint{ {{ volume.mountpoint }} } \
@@ -111,7 +111,7 @@ d-i partman-auto/expert_recipe string
{% endfor %}
1 101 -1 ext4 \
$defaultignore{ } $lvmok{ } \
- in_vg{ {{ hostvars[install_hostname].host_name }} } lv_name{ dummy } \
+ in_vg{ {{ host_name }} } lv_name{ dummy } \
method{ unused } \
.