diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-07-03 02:00:29 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-07-03 02:00:29 +0200 |
commit | 972a2ec5dbc6da4b8ee36079220c1dba8696f593 (patch) | |
tree | bc167799883dc6dd328bced486c5d3a1cfdbfc2c | |
parent | preseed: software-raid with root_lvm_size works now (diff) |
use new preseed config in some hosts
-rw-r--r-- | inventory/host_vars/ch-oulu.yml | 9 | ||||
-rw-r--r-- | inventory/host_vars/ele-calypso.yml | 11 | ||||
-rw-r--r-- | inventory/host_vars/sk-testvm.yml | 13 | ||||
-rw-r--r-- | roles/installer/debian/preseed/templates/partman_ws_config.j2 | 72 | ||||
-rw-r--r-- | roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 | 73 |
5 files changed, 88 insertions, 90 deletions
diff --git a/inventory/host_vars/ch-oulu.yml b/inventory/host_vars/ch-oulu.yml index b5b86138..d0d035d2 100644 --- a/inventory/host_vars/ch-oulu.yml +++ b/inventory/host_vars/ch-oulu.yml @@ -2,8 +2,13 @@ install: efi: true disks: - primary: /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_1TB_S462NF0M800161Z - # primary: /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_1TB_S462NF0M800191M + root_lvm_size: 15G + primary: software-raid + raid: + level: 1 + members: + - /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_1TB_S462NF0M800161Z + - /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_1TB_S462NF0M800191M network: nameservers: diff --git a/inventory/host_vars/ele-calypso.yml b/inventory/host_vars/ele-calypso.yml index 865bcebb..ab8fca7c 100644 --- a/inventory/host_vars/ele-calypso.yml +++ b/inventory/host_vars/ele-calypso.yml @@ -1,7 +1,12 @@ --- -preseed_template_name: "debian-buster-with-raid" - -install: {} +install: + disks: + primary: software-raid + raid: + level: 1 + members: + - /dev/sda + - /dev/sdb network: nameservers: "{{ network_zones.lan.dns }}" diff --git a/inventory/host_vars/sk-testvm.yml b/inventory/host_vars/sk-testvm.yml index 73012082..86c00c1f 100644 --- a/inventory/host_vars/sk-testvm.yml +++ b/inventory/host_vars/sk-testvm.yml @@ -5,23 +5,12 @@ install: numcpus: 1 autostart: False disks: - # primary: software-raid - # raid: - # level: 1 - # members: - # - /dev/sda - # - /dev/sdb primary: /dev/sda - root_lvm_size: 10G scsi: sda: type: zfs name: root - size: 20g - # sdb: - # type: zfs - # name: root2 - # size: 10g + size: 10g interfaces: - bridge: br-public name: primary0 diff --git a/roles/installer/debian/preseed/templates/partman_ws_config.j2 b/roles/installer/debian/preseed/templates/partman_ws_config.j2 deleted file mode 100644 index 54fe94f1..00000000 --- a/roles/installer/debian/preseed/templates/partman_ws_config.j2 +++ /dev/null @@ -1,72 +0,0 @@ -d-i partman/early_command string \ - debconf-set partman-auto/disk "$(readlink -f {{ hostvars[install_hostname].install_cooked.disks.primary }})"; \ - debconf-set grub-installer/bootdev "$(readlink -f {{ hostvars[install_hostname].install_cooked.disks.primary }})"; \ - umount -l /media || true - -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman-md/device_remove_md boolean true -d-i partman-md/confirm boolean true -d-i partman-md/confirm_nooverwrite boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true - -d-i partman-auto/method string lvm -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/guided_size string max -d-i partman-auto-lvm/no_boot boolean true - -{% if (hostvars[install_hostname].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 -{% endif %} -d-i partman-auto/expert_recipe string \ - boot-root :: \ -{% if (hostvars[install_hostname].install_cooked.efi | default(false)) %} - 100 100 128 fat16 \ - $defaultignore{ } $primary{ } $bootable{ } \ - method{ efi } format{ } \ - . \ -{% endif %} - 1000 10000 -1 ext4 \ - $defaultignore{ } $primary{ } $bootable{ } \ - method{ lvm } vg_name{ {{ hostvars[install_hostname].host_name }} } \ - . \ - 15360 10000 20480 ext4 \ - $lvmok{ } in_vg{ {{ hostvars[install_hostname].host_name }} } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - mountpoint{ / } \ - . \ - 768 10000 768 ext4 \ - $lvmok{ } in_vg{ {{ hostvars[install_hostname].host_name }} } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - mountpoint{ /var/log } \ - options/nodev{ nodev } options/noatime{ noatime } \ - options/noexec{ noexec } \ - . \ - 20480 10000 40960 ext4 \ - $lvmok{ } in_vg{ {{ hostvars[install_hostname].host_name }} } \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - mountpoint{ /home } \ - . \ - 16 20000 -1 ext4 \ - $lvmok{ } in_vg{ {{ hostvars[install_hostname].host_name }} } \ - lv_name{ dummy } \ - . - -d-i partman-basicfilesystems/no_swap true -d-i partman-partitioning/confirm_write_new_label boolean true -d-i partman/choose_partition select finish - - -## boot devices are configured by partman/early_command -d-i grub-installer/bootdev seen true -d-i grub-installer/choose_bootdev seen true -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean false diff --git a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 index 4927e00b..eeda9943 100644 --- a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 +++ b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 @@ -57,7 +57,78 @@ d-i time/zone string Europe/Vienna d-i clock-setup/ntp boolean false -{% include 'partman_ws_config.j2' %} +d-i partman/early_command string \ + debconf-set partman-auto/disk "$(readlink -f {{ hostvars[install_hostname].install_cooked.disks.primary }})"; \ + debconf-set grub-installer/bootdev "$(readlink -f {{ hostvars[install_hostname].install_cooked.disks.primary }})"; \ + umount -l /media || true + +d-i partman/confirm boolean true +d-i partman/confirm_nooverwrite boolean true +d-i partman-md/device_remove_md boolean true +d-i partman-md/confirm boolean true +d-i partman-md/confirm_nooverwrite boolean true +d-i partman-lvm/device_remove_lvm boolean true +d-i partman-lvm/confirm boolean true +d-i partman-lvm/confirm_nooverwrite boolean true + +d-i partman-auto/method string lvm +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/guided_size string max +d-i partman-auto-lvm/no_boot boolean true + +{% if (hostvars[install_hostname].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 +{% endif %} +d-i partman-auto/expert_recipe string \ + boot-root :: \ +{% if (hostvars[install_hostname].install_cooked.efi | default(false)) %} + 100 100 128 fat16 \ + $defaultignore{ } $primary{ } $bootable{ } \ + method{ efi } format{ } \ + . \ +{% endif %} + 1000 10000 -1 ext4 \ + $defaultignore{ } $primary{ } $bootable{ } \ + method{ lvm } vg_name{ {{ hostvars[install_hostname].host_name }} } \ + . \ + 15360 10000 20480 ext4 \ + $lvmok{ } in_vg{ {{ hostvars[install_hostname].host_name }} } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ / } \ + . \ + 768 10000 768 ext4 \ + $lvmok{ } in_vg{ {{ hostvars[install_hostname].host_name }} } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ /var/log } \ + options/nodev{ nodev } options/noatime{ noatime } \ + options/noexec{ noexec } \ + . \ + 20480 10000 40960 ext4 \ + $lvmok{ } in_vg{ {{ hostvars[install_hostname].host_name }} } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ /home } \ + . \ + 16 20000 -1 ext4 \ + $lvmok{ } in_vg{ {{ hostvars[install_hostname].host_name }} } \ + lv_name{ dummy } \ + . + +d-i partman-basicfilesystems/no_swap true +d-i partman-partitioning/confirm_write_new_label boolean true +d-i partman/choose_partition select finish + + +## boot devices are configured by partman/early_command +d-i grub-installer/bootdev seen true +d-i grub-installer/choose_bootdev seen true +d-i grub-installer/only_debian boolean true +d-i grub-installer/with_other_os boolean false d-i base-installer/install-recommends boolean false |