From 2a7602394af716163025d047fcc4c5fa085f6ec3 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 30 Jul 2023 16:36:46 +0200 Subject: ch-equinox-ws: re-install on ubuntu jammy --- chaos-at-home/ch-equinox-ws.yml | 77 +++++++----------- inventory/host_vars/ch-equinox-ws.yml | 92 ++++++++++++---------- .../installer/ubuntu/autoinstall/defaults/main.yml | 3 + .../autoinstall/templates/autoinstall.yml.j2 | 3 +- 4 files changed, 84 insertions(+), 91 deletions(-) diff --git a/chaos-at-home/ch-equinox-ws.yml b/chaos-at-home/ch-equinox-ws.yml index 26a0dc79..1fccc684 100644 --- a/chaos-at-home/ch-equinox-ws.yml +++ b/chaos-at-home/ch-equinox-ws.yml @@ -18,10 +18,12 @@ - role: apt-repo/tor-project - role: apt-repo/kubernetes - role: apt-repo/element - - role: apt-repo/freecad - role: apt-repo/kicad6 + - role: storage/zfs/pools + - role: storage/zfs/sanoid - role: ws/base - role: core/admin-users + - role: ws/pipewire - role: ws/flatpak post_tasks: - name: disable caps-lock @@ -38,58 +40,35 @@ opts: nodev,x-systemd.automount,nofail state: mounted - - name: create pulse daemon config directory - file: - path: /etc/pulse/daemon.conf.d - state: directory - - - name: force pulseaudio sample rates to 48kHz (workadournd for Motu M4) - copy: - content: | - resample-method = speex-float-10 - avoid-resampling = false - - default-sample-format = float32le - default-sample-rate = 48000 - alternate-sample-rate = 48000 - dest: /etc/pulse/daemon.conf.d/motu-m4.conf - - - name: disable USB Powermanagement for Motu M4 - copy: - content: | - ## workaround for spurious audio issues with Motu M4 - ATTRS{idVendor}=="07fd", ATTRS{idProduct}=="0008", ATTR{power/control}="on", ATTR{power/persist}="0" - dest: /etc/udev/rules.d/90-motu-m4-power.rules - - - name: mask virtualbox web service unit - systemd: - name: vboxweb.service - masked: true - state: stopped - - name: install deps for c3voc/cm repo pip: name: - "bundlewrap>=4.13.6" - "bundlewrap-keepass" - - name: install gotify-desktop - become: yes - become_method: su - become_user: "equinox" - block: - - name: get list of installed cargo crates - check_mode: no - command: "cargo install --list" - changed_when: false - register: installed_cargo_crates + # - name: mask virtualbox web service unit + # systemd: + # name: vboxweb.service + # masked: true + # state: stopped + + # - name: install gotify-desktop + # become: yes + # become_method: su + # become_user: "equinox" + # block: + # - name: get list of installed cargo crates + # check_mode: no + # command: "cargo install --list" + # changed_when: false + # register: installed_cargo_crates - - name: build - loop: - - name: gotify-desktop - version: 1.2.0 - url: https://github.com/desbma/gotify-desktop.git - loop_control: - label: "{{ item.name }} ({{ item.version }})" - when: (item.name+' v'+ item.version) not in installed_cargo_crates.stdout - command: "cargo install --git '{{ item.url }}' --tag '{{ item.version }}'" + # - name: build + # loop: + # - name: gotify-desktop + # version: 1.2.0 + # url: https://github.com/desbma/gotify-desktop.git + # loop_control: + # label: "{{ item.name }} ({{ item.version }})" + # when: (item.name+' v'+ item.version) not in installed_cargo_crates.stdout + # command: "cargo install --git '{{ item.url }}' --tag '{{ item.version }}'" diff --git a/inventory/host_vars/ch-equinox-ws.yml b/inventory/host_vars/ch-equinox-ws.yml index 6cbaa529..6ab03bdf 100644 --- a/inventory/host_vars/ch-equinox-ws.yml +++ b/inventory/host_vars/ch-equinox-ws.yml @@ -1,39 +1,29 @@ --- -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_kernel_image: linux-generic-hwe-20.04 -debian_preseed_no_splash: no -debian_preseed_install_tasks: - - xubuntu-desktop +ubuntu_autoinstall_desktop: xubuntu +ubuntu_autoinstall_apt_arches: + - amd64 + - i386 +ubuntu_autoinstall_manual_partitioning: yes +### +# mark disk as bootable (EFI System Partition gets created) +# edit ESP -> size 128M +# add new GPT Part, whole disk, unformatted -> create new LVM: name ws +# add new LV, root, 80G, ext4, / +# add new LV, storage, 1T, unformatted install: efi: yes disks: - primary: /dev/disk/by-id/nvme-Samsung_SSD_970_PRO_1TB_S462NF0MA04112K - system_lvm: - volumes: - - name: root - size: 50G - filesystem: ext4 - mountpoint: / - - name: var+log - size: 768M - filesystem: ext4 - mountpoint: /var/log - mount_options: - - noatime - - nodev - - noexec - - name: home - size: 400G - filesystem: ext4 - mountpoint: /home + primary: /dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NF0W501712E + kernel_cmdline: + - quiet + - splash network: nameservers: "{{ network_zones.lan.dns }}" @@ -51,6 +41,8 @@ network: base_modules_blacklist: "{{ base_modules_blacklist_none }}" sshd_password_auth: yes +ssh_keys_root_extra: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBjZEFZLrl2KIqYl/GU8Vkp7mlhAbFbjwf4Ht9zQRmI8 ZFS Backup syncoid@epimetheus zsh_banner: equinox @@ -70,6 +62,32 @@ spreadspace_apt_repo_components: wakeonlan_interfaces: - enp4s0 +zfs_arc_size: + min: 512M + max: 2G + +zfs_pools: + storage: + mountpoint: /srv/storage + create_vdevs: /dev/mapper/ws-storage + properties: + ashift: 12 + autotrim: "on" + +zfs_sanoid_modules: + storage: + use_template: production + recursive: yes + process_children_only: yes + + +ws_base_home_zfs: + pool: storage + name: home + properties: + xattr: sa + compression: lz4 + quota: 800G ws_base_extra_packages: - aisleriot @@ -135,6 +153,7 @@ ws_base_extra_packages: - gnome-games - gnome-mahjongg - gpredict + - gpsd-clients - gputils - graphviz - gstreamer1.0-vaapi @@ -155,7 +174,7 @@ ws_base_extra_packages: - kpartx - libdbd-mysql-perl - libgpgme11 - - librust-openssl-dev + - libncurses5 - libusb-dev - libusb-1.0-0-dev - libvirt-clients @@ -232,6 +251,7 @@ ws_base_extra_packages: - signify-openbsd - signing-party - sigrok-cli + - skopeo - socat - spice-client-gtk - sqlite3 @@ -277,8 +297,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 - k9s - kubeletctl # needs apt-repo/ansible @@ -291,14 +311,6 @@ ws_base_extra_packages: # needs apt-repo/element - element-desktop -## needs PPA or other external repo ?? - # - bazel - # - deadbeef - # - google-chrome-stable - # - opera-stable - # - studio-link-standalone - # - virtualbox - # - youtube-dl ws_base_xrandr_setup_script: | #!/bin/bash diff --git a/roles/installer/ubuntu/autoinstall/defaults/main.yml b/roles/installer/ubuntu/autoinstall/defaults/main.yml index 50a35ae1..51ac6114 100644 --- a/roles/installer/ubuntu/autoinstall/defaults/main.yml +++ b/roles/installer/ubuntu/autoinstall/defaults/main.yml @@ -39,4 +39,7 @@ ubuntu_autoinstall_system_lvm_volumes_default: - noexec +ubuntu_autoinstall_apt_arches: + - amd64 + ubuntu_autoinstall_install_tasks: [] diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 index 3a3e1689..98d6699b 100644 --- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 +++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 @@ -203,8 +203,7 @@ autoinstall: apt: primary: - uri: http://{{ apt_repo_providers[apt_repo_provider].ubuntu.host }}{{ apt_repo_providers[apt_repo_provider].ubuntu.path }} - arches: - - amd64 + arches: {{ ubuntu_autoinstall_apt_arches | to_json}} user-data: hostname: "{{ host_name }}" -- cgit v1.2.3