diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-09-25 22:47:11 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-09-25 22:47:11 +0200 |
commit | 5b237a083bb7d252af37de60a69d2704b48aaf71 (patch) | |
tree | b37e43a3329d391a61dc6057e9c307a8abfb6d84 /roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 | |
parent | Merge branch 'topic/wifi-roaming' (diff) | |
parent | upgrade ch-equinox-t450s to jammy (final) (diff) |
Merge branch 'topic/t450s-jammy'
Diffstat (limited to 'roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2')
-rw-r--r-- | roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 | 96 |
1 files changed, 51 insertions, 45 deletions
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 index 496363a9..1dfd44db 100644 --- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 +++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 @@ -27,37 +27,42 @@ autoinstall: {% endif %} {% endif %} +{% if ubuntu_autoinstall_manual_partitioning %} + interactive-sections: + - storage + +{% else %} storage: config: -{% if install.disks.primary != "software-raid" %} +{% if install.disks.primary != "software-raid" %} - id: disk-primary type: disk path: {{ install.disks.primary }} -{% if install.efi | default(false) %} +{% if install.efi | default(false) %} ptable: gpt -{% else %} +{% else %} ptable: msdos grub_device: true -{% endif %} +{% endif %} wipe: superblock-recursive -{% else %} -{% for raid_member in install.disks.raid.members %} +{% else %} +{% for raid_member in install.disks.raid.members %} - id: raid-disk{{ loop.index }} type: disk path: {{ raid_member }} -{% if install.efi | default(false) %} +{% if install.efi | default(false) %} ptable: gpt -{% else %} +{% else %} ptable: msdos grub_device: true -{% endif %} +{% endif %} wipe: superblock-recursive -{% endfor %} -{% endif %} +{% endfor %} +{% endif %} -{% if install.efi | default(false) %} -{% set part_offset = 1 %} -{% if install.disks.primary != "software-raid" %} +{% if install.efi | default(false) %} +{% set part_offset = 1 %} +{% if install.disks.primary != "software-raid" %} - id: partition-esp type: partition device: disk-primary @@ -74,8 +79,8 @@ autoinstall: type: mount device: format-esp path: /boot/efi -{% else %} -{% for raid_member in install.disks.raid.members %} +{% else %} +{% for raid_member in install.disks.raid.members %} - id: partition-esp{{ loop.index }} type: partition device: raid-disk{{ loop.index }} @@ -92,28 +97,28 @@ autoinstall: type: mount device: format-esp{{ loop.index }} path: /boot/efi -{% endfor %} -{% endif %} +{% endfor %} +{% endif %} -{% else %} -{% set part_offset = 0 %} -{% endif %} -{% if install.disks.primary == "software-raid" %} -{% for raid_member in install.disks.raid.members %} +{% else %} +{% set part_offset = 0 %} +{% endif %} +{% if install.disks.primary == "software-raid" %} +{% for raid_member in install.disks.raid.members %} - id: raid-partition-boot{{ loop.index }} type: partition device: raid-disk{{ loop.index }} number: {{ part_offset + 1 }} size: {{ ubuntu_autoinstall_swraid_boot_size | human_to_bytes }} -{% endfor %} +{% endfor %} - id: partition-boot type: raid name: md-boot raidlevel: {{ install.disks.raid.level }} devices: -{% for raid_member in install.disks.raid.members %} +{% for raid_member in install.disks.raid.members %} - raid-partition-boot{{ loop.index }} -{% endfor %} +{% endfor %} - id: format-boot type: format volume: partition-boot @@ -122,60 +127,60 @@ autoinstall: type: mount device: format-boot path: /boot -{% set part_offset = part_offset + 1 %} +{% set part_offset = part_offset + 1 %} -{% endif %} -{% set system_lvm_size = install.system_lvm.size | default(ubuntu_autoinstall_system_lvm_size_default) %} -{% set system_lvm_volumes = install.system_lvm.volumes | default(ubuntu_autoinstall_system_lvm_volumes_default) %} -{% if install.disks.primary != "software-raid" %} +{% endif %} +{% set system_lvm_size = install.system_lvm.size | default(ubuntu_autoinstall_system_lvm_size_default) %} +{% set system_lvm_volumes = install.system_lvm.volumes | default(ubuntu_autoinstall_system_lvm_volumes_default) %} +{% if install.disks.primary != "software-raid" %} - id: partition-lvm type: partition device: disk-primary flag: linux number: {{ part_offset + 1 }} -{% if system_lvm_size != 'all' %} +{% if system_lvm_size != 'all' %} size: {{ system_lvm_size | human_to_bytes }} - id: partition-unused type: partition device: disk-primary flag: linux number: {{ part_offset + 2 }} -{% endif %} +{% endif %} size: -1 -{% else %} -{% for raid_member in install.disks.raid.members %} +{% else %} +{% for raid_member in install.disks.raid.members %} - id: raid-partition-lvm{{ loop.index }} type: partition device: raid-disk{{ loop.index }} number: {{ part_offset + 1 }} -{% if system_lvm_size != 'all' %} +{% if system_lvm_size != 'all' %} size: {{ system_lvm_size | human_to_bytes }} - id: raid-partition-unused{{ loop.index }} type: partition device: raid-disk{{ loop.index }} flag: linux number: {{ part_offset + 2 }} -{% endif %} +{% endif %} size: -1 -{% endfor %} +{% endfor %} - id: partition-lvm type: raid name: md-lvm raidlevel: {{ install.disks.raid.level }} devices: -{% for raid_member in install.disks.raid.members %} +{% for raid_member in install.disks.raid.members %} - raid-partition-lvm{{ loop.index }} -{% endfor %} +{% endfor %} -{% endif %} +{% endif %} - id: lvm-vg-system type: lvm_volgroup devices: - partition-lvm name: {{ host_name }} -{% for volume in system_lvm_volumes %} +{% for volume in system_lvm_volumes %} - id: lvm-lv-{{ volume.name }} type: lvm_partition volgroup: lvm-vg-system @@ -189,11 +194,12 @@ autoinstall: type: mount device: format-{{ volume.name }} path: {{ volume.mountpoint }} -{% if 'mount_options' in volume and (volume.mount_options | length) > 0 %} +{% if 'mount_options' in volume and (volume.mount_options | length) > 0 %} options: '{{ volume.mount_options | join(",") }}' -{% endif %} +{% endif %} -{% endfor %} +{% endfor %} +{% endif %} apt: primary: - uri: http://{{ apt_repo_providers[apt_repo_provider].ubuntu.host }}{{ apt_repo_providers[apt_repo_provider].ubuntu.path }} |