From a1f5550dd6de108f68ea3d6b2a42fe47b49561a4 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 4 Jul 2020 17:39:00 +0200 Subject: cloud install: support custom partition layout --- roles/cloud/install/templates/hetzner_installimage.conf.j2 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'roles/cloud/install/templates/hetzner_installimage.conf.j2') diff --git a/roles/cloud/install/templates/hetzner_installimage.conf.j2 b/roles/cloud/install/templates/hetzner_installimage.conf.j2 index ed22f286..e3cd4c4e 100644 --- a/roles/cloud/install/templates/hetzner_installimage.conf.j2 +++ b/roles/cloud/install/templates/hetzner_installimage.conf.j2 @@ -13,12 +13,14 @@ DRIVE1 {{ install_cooked.disks.primary }} DRIVE1 /dev/sda {% endif %} BOOTLOADER grub -PART /boot ext4 512M -PART lvm {{ host_name }} {{ install_cooked.disks.root_lvm_size }} -{% if install_cooked.disks.root_lvm_size != "all" %} +PART /boot ext4 {{ hetzner_boot_size }} +{% set system_lvm_size = install_cooked.system_lvm.size | default(hetzner_system_lvm_size_default) %} +PART lvm {{ host_name }} {{ system_lvm_size }} +{% if system_lvm_size != "all" %} PART /dummy ext4 all {% endif %} -LV {{ host_name }} root / ext4 2560M -LV {{ host_name }} var /var ext4 1280M -LV {{ host_name }} var+log /var/log ext4 768M +{% set system_lvm_volumes = install_cooked.system_lvm.volumes | default(hetzner_system_lvm_volumes_default) %} +{% for volume in system_lvm_volumes %} +LV {{ host_name }} {{ volume.name }} {{ volume.mountpoint }} {{ volume.filesystem }} {{ volume.size }} +{% endfor %} IMAGE {{ latest_image.stdout }} -- cgit v1.2.3