summaryrefslogtreecommitdiff
path: root/roles/installer
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-11-20 19:52:17 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-11-20 19:52:17 +0100
commit7ec54cbb4f3150fe42c49a1210f51f5078d5637d (patch)
treeac5d878493392dfe6046c124ad4ad14172311b34 /roles/installer
parentch-equinox-ws: add some packages (diff)
presseed: fix some variable precedence
Diffstat (limited to 'roles/installer')
-rw-r--r--roles/installer/debian/iso/templates/grub.cfg.j22
-rw-r--r--roles/installer/debian/preseed/defaults/main.yml8
-rw-r--r--roles/installer/debian/preseed/templates/partman_config.j29
3 files changed, 12 insertions, 7 deletions
diff --git a/roles/installer/debian/iso/templates/grub.cfg.j2 b/roles/installer/debian/iso/templates/grub.cfg.j2
index 52b4bf10..31ec5d8b 100644
--- a/roles/installer/debian/iso/templates/grub.cfg.j2
+++ b/roles/installer/debian/iso/templates/grub.cfg.j2
@@ -15,6 +15,6 @@ set timeout=10
set default=0
menuentry "automated installer for {{ install_hostname }}" {
- linux /linux --- install {{ (hostvars[install_hostname].install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ linux /linux --- auto {{ (hostvars[install_hostname].install_cooked.kernel_cmdline | default([])) | join(' ') }}
initrd /initrd.gz
}
diff --git a/roles/installer/debian/preseed/defaults/main.yml b/roles/installer/debian/preseed/defaults/main.yml
index 5b7bea07..2ea95dda 100644
--- a/roles/installer/debian/preseed/defaults/main.yml
+++ b/roles/installer/debian/preseed/defaults/main.yml
@@ -20,10 +20,12 @@ preseed_virtual_machine: no
preseed_no_splash: yes
-preseed_efi_esp_size: 128
-preseed_swraid_boot_size: 256
+preseed_efi_esp_size: 128M
+preseed_swraid_boot_size: 256M
+
+## not used, see templates/partman_config.j2
+preseed_system_lvm_reserve_default: 384M
-preseed_system_lvm_reserve: 384
preseed_system_lvm_size_default: all
preseed_system_lvm_volumes_default:
- name: root
diff --git a/roles/installer/debian/preseed/templates/partman_config.j2 b/roles/installer/debian/preseed/templates/partman_config.j2
index 4ae3241f..975c2fe5 100644
--- a/roles/installer/debian/preseed/templates/partman_config.j2
+++ b/roles/installer/debian/preseed/templates/partman_config.j2
@@ -35,7 +35,8 @@ d-i partman-basicfilesystems/default_label string msdos
{% 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) %}
{# on small disks this probably triggers: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896826 ... #}
-{# set system_lvm_pv_size_min_mb = (((system_lvm_volumes | map(attribute='size') | map('human_to_bytes') | sum) / (1024*1024)) | int) + preseed_system_lvm_reserve #}
+{# set system_lvm_reserve = hostvars[install_hostname].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 %}
@@ -47,13 +48,15 @@ d-i partman-auto/method string lvm
d-i partman-auto/expert_recipe string \
ansible :: \
{% if (hostvars[install_hostname].install_cooked.efi | default(false)) %}
- {{ preseed_efi_esp_size }} {{ preseed_efi_esp_size }} {{ preseed_efi_esp_size }} fat16 \
+{% set efi_esp_size_mb = (((hostvars[install_hostname].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" %}
- {{ preseed_swraid_boot_size }} {{ preseed_swraid_boot_size }} {{ preseed_swraid_boot_size }} raid \
+{% set swraid_boot_size_mb = (((hostvars[install_hostname].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 } \
. \