diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-09-25 15:31:26 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-09-25 15:31:26 +0200 |
commit | b321a5d57f4b5ca5169f953fd9f39b93b7b21b14 (patch) | |
tree | 2a05bf3f7a7b4ac8628c6f38095d6abc66b78d22 | |
parent | finalize ch-mc* setups for now (diff) |
ch-equinot-t450s on jammy (WIP)
-rw-r--r-- | chaos-at-home/ch-equinox-t450s.yml | 11 | ||||
-rw-r--r-- | inventory/host_vars/ch-equinox-t450s.yml | 39 | ||||
-rw-r--r-- | roles/installer/ubuntu/autoinstall/defaults/main.yml | 2 | ||||
-rw-r--r-- | roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 | 96 |
4 files changed, 79 insertions, 69 deletions
diff --git a/chaos-at-home/ch-equinox-t450s.yml b/chaos-at-home/ch-equinox-t450s.yml index 9022f337..6f370e5f 100644 --- a/chaos-at-home/ch-equinox-t450s.yml +++ b/chaos-at-home/ch-equinox-t450s.yml @@ -7,6 +7,10 @@ - role: core/sshd/base - role: core/zsh - role: core/cpu-microcode + +- name: Payload Setup + hosts: ch-equinox-t450s + roles: - role: apt-repo/backports - role: apt-repo/spreadspace - role: apt-repo/ansible @@ -16,7 +20,6 @@ - role: apt-repo/riot - role: apt-repo/brave - role: apt-repo/nordvpn - - role: apt-repo/freecad - role: apt-repo/kicad6 - role: storage/zfs/pools - role: storage/zfs/sanoid @@ -70,12 +73,6 @@ echo "Touchpad not found..." fi - - name: mask virtualbox web service unit - systemd: - name: vboxweb.service - masked: true - state: stopped - - name: add flathub to systemd-wide flatpak remotes community.general.flatpak_remote: name: flathub diff --git a/inventory/host_vars/ch-equinox-t450s.yml b/inventory/host_vars/ch-equinox-t450s.yml index 6cc1ba39..89834cfb 100644 --- a/inventory/host_vars/ch-equinox-t450s.yml +++ b/inventory/host_vars/ch-equinox-t450s.yml @@ -1,33 +1,38 @@ --- -debian_preseed_language: de -debian_preseed_country: AT -debian_preseed_locales: - - de_AT.UTF-8 - - de_DE.UTF-8 - - en_US.UTF-8 +ubuntu_autoinstall_locale: de_AT +ubuntu_autoinstall_keyboard_layout: de +ubuntu_autoinstall_keyboard_variant: nodeadkeys +ubuntu_autoinstall_timezone: Europe/Vienna -debian_preseed_no_splash: no -debian_preseed_install_tasks: - - xubuntu-desktop +ubuntu_autoinstall_desktop: xubuntu +ubuntu_autoinstall_manual_partitioning: yes +### +# mark disk as bootable (EFI System Partition gets created) +# edit ESP -> size 128M +# add new GPT Part, 1G, ext4, /boot +# add new GPT Part, rest of disk, unformatted -> create new LVM: name t450s, enable crypto +# add new LV, root, 40G, ext4, / +# add new LV, var+log, 768M, ext4, /var/log +# add new LV, storage, 500G, unformatted -debian_preseed_no_netplan: yes -debian_preseed_manual_partitioning: yes install: efi: yes + kernel_cmdline: + - quiet + - splash install_dhcp: yes network: domain: "{{ host_domain }}" primary: - name: enp0s25 + name: enx00e04d6a076e base_modules_blacklist: "{{ base_modules_blacklist_none }}" sshd_password_auth: yes ssh_keys_root_extra: - - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9AkOBxvf1wZ0B3wEyf7O3GbaIGx5o2f6cVuQIrOjeFfgMSAr1LwiB/gmHhMSEq6OSauD37TA5yDIrzk6NPPjVs/wiklsHgYtTqIxSPItTZFPX4gLvNwwGuRvEW9bTEiHd+bVPIiIT7HOje0kgacjan44rdgppX9DgcUp2j7uSZZabsxDCS/ms0slhwBNU1gtR31PoQ56vIya23D2uMauNAbRJzDEOfAjy4pHF8njYcXPas/yrbLi8PUZ1YO1u/AZto96EIYfHaCLWlstqeCX+R2JrTunvfTr8TF3AkFw8lHMzk3neUR+tPAAFQaqeTlqGPiSNq1Oyf+52XR16qwhd equinox@mail - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZK9NBainiE0+A8pT8dbwlNZ0k0AZVhLTzUSo3YtKJt ZFS Backup syncoid@epimetheus zsh_banner: equinox @@ -43,7 +48,7 @@ apt_repo_components: spreadspace_apt_repo_components: - main - - container +# - container ## TODO: not yet available for jammy zfs_arc_size: min: 512M @@ -247,7 +252,7 @@ ws_base_extra_packages: - wavemon - whois - wine - - wine32 + #- wine32 ## TODO: need to enable i386 arch in dpkg... - wine64 - winetricks - wireshark @@ -261,8 +266,8 @@ ws_base_extra_packages: - yasm # needs apt-repo/spreadspace - go - - info-beamer - - helm + #- info-beamer ## TODO: not yet in repo for jammy + #- helm ## TODO: not yet in repo for jammy # needs apt-repo/ansible - ansible # needs apt-repo/tor-project diff --git a/roles/installer/ubuntu/autoinstall/defaults/main.yml b/roles/installer/ubuntu/autoinstall/defaults/main.yml index a470dfac..109ad855 100644 --- a/roles/installer/ubuntu/autoinstall/defaults/main.yml +++ b/roles/installer/ubuntu/autoinstall/defaults/main.yml @@ -13,6 +13,8 @@ ubuntu_autoinstall_virtual_machine: no # ubuntu_autoinstall_desktop: xubuntu +ubuntu_autoinstall_manual_partitioning: no + ubuntu_autoinstall_efi_esp_size: 128M ubuntu_autoinstall_swraid_boot_size: 256M 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 }} |