Mercurial > code > home > repos > infra
changeset 240:b58f05be720a
updates for new ubuntu 23.10 install
author | drewp@bigasterisk.com |
---|---|
date | Mon, 11 Dec 2023 21:22:12 -0800 |
parents | ec7b0280add3 |
children | 075ceead3673 |
files | apt.py files/fstab/dash home.py kube.py packages.py templates/sources.list.j2 wireguard_pubkey.py |
diffstat | 7 files changed, 46 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/apt.py Sat Dec 02 18:38:56 2023 -0800 +++ b/apt.py Mon Dec 11 21:22:12 2023 -0800 @@ -20,10 +20,11 @@ # and it makes this, which is redundant with my sources.list template line files.file(path='/etc/apt/sources.list.d/vscode.list', present=False) + apt.packages(packages=['curl']) server.shell(commands=[ f"curl -fsSL {url} | gpg --dearmor > /etc/apt/keyrings/{name}" for (url, name) in [ ('https://packages.microsoft.com/keys/microsoft.asc', 'ms.gpg'), - ('https://deb.nodesource.com/gpgkey/nodesource.gpg.key', 'nodesource.gpg'), + ('https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key', 'nodesource.gpg'), ('https://dl.google.com/linux/linux_signing_key.pub', 'chrome.gpg'), ('https://ftp-master.debian.org/keys/archive-key-11.asc', 'bullseye.gpg'), ('https://ftp-master.debian.org/keys/archive-key-11-security.asc', 'bullseye-security.gpg'), @@ -41,7 +42,13 @@ dir = Path('/etc/apt/sources.list.d') -def clear_known_sources_files(known=[dir / 'vscode.list']): +def clear_known_sources_files(known=[ + dir / 'vscode.list', + dir / 'google-chrome.list', + dir / 'steam-beta.list', + dir / 'google-chrome-unstable.list', + dir / 'steam-stable.list', +]): found = map(Path, host.get_fact(FindFiles, dir, quote_path=True)) if set(found) - set(known): raise SystemExit(f"new files in {host.name} /etc/apt/sources.list.d/ - please remove")
--- a/files/fstab/dash Sat Dec 02 18:38:56 2023 -0800 +++ b/files/fstab/dash Mon Dec 11 21:22:12 2023 -0800 @@ -1,10 +1,13 @@ # written by pyinfra # <file system> <mount point> <type> <options> <dump> <pass> -UUID=6cae1c30-3c91-4aa7-9e9f-fcbd7ff706fe / ext4 errors=remount-ro 0 1 -UUID=b88f75cd-9022-4af9-a11b-5a5a1fbd3132 /d2 ext4 defaults 0 0 -UUID=3b6780e0-ec86-43be-8d09-e462dbad762e /d3 ext4 defaults 0 0 -UUID=73bcd201-5f77-4f68-9fba-47835c3c1692 /d4 ext4 defaults 0 0 +/dev/disk/by-uuid/d8d23ff1-7c37-4a7d-9fc4-55fc61f912a0 / ext4 defaults 0 1 +/dev/disk/by-uuid/CB55-821E /boot/efi vfat defaults 0 1 + +#UUID=6cae1c30-3c91-4aa7-9e9f-fcbd7ff706fe / ext4 errors=remount-ro 0 1 +#UUID=b88f75cd-9022-4af9-a11b-5a5a1fbd3132 /d2 ext4 defaults 0 0 +#UUID=3b6780e0-ec86-43be-8d09-e462dbad762e /d3 ext4 defaults 0 0 +#UUID=73bcd201-5f77-4f68-9fba-47835c3c1692 /d4 ext4 defaults 0 0 #/swap.img none swap sw 0 0 ditto5:/my /my nfs rw,noatime 0 0
--- a/home.py Sat Dec 02 18:38:56 2023 -0800 +++ b/home.py Mon Dec 11 21:22:12 2023 -0800 @@ -24,6 +24,7 @@ +# chsh --shell /bin/zsh #drwx------ 3 drewp drewp 4096 Jul 31 15:07 .config/syncthing #npm.rc?
--- a/kube.py Sat Dec 02 18:38:56 2023 -0800 +++ b/kube.py Mon Dec 11 21:22:12 2023 -0800 @@ -59,6 +59,9 @@ # don't try to get aufs-dkms on rpi-- https://github.com/docker/for-linux/issues/709 def podman_insecure_registry(reg): files.template(src='templates/kube/podman_registries.conf.j2', dest='/etc/containers/registries.conf.d/reg.conf', reg=reg) + systemd.service(service='podman', user_mode=True) + systemd.service(service='podman.socket', user_mode=True) + def config_and_run_service(k3s_version, server_node, server_ip): download_k3s(k3s_version)
--- a/packages.py Sat Dec 02 18:38:56 2023 -0800 +++ b/packages.py Mon Dec 11 21:22:12 2023 -0800 @@ -53,7 +53,7 @@ systemd.service(service='nginx', enabled=False, running=False) -kw = dict(latest=True) +kw = dict(present=True, latest=True) apt.packages(packages=package_lists.setup, **kw) @@ -82,12 +82,6 @@ if host.name == 'plus': apt.packages(packages=package_lists.laptop, **kw) -desktop_env = host.name in ['dash', 'slash', 'plus', 'squib'] -if desktop_env: - apt.packages(packages=package_lists.xorg + package_lists.desktop, **kw) - apt.deb(src="http://mirrors.kernel.org/ubuntu/pool/universe/libp/libpod/podman_4.3.1+ds1-5ubuntu1_amd64.deb") - apt.deb(src="http://mirrors.kernel.org/ubuntu/pool/universe/libp/libpod/podman-docker_4.3.1+ds1-5ubuntu1_amd64.deb") - pdm() if not is_pi: apt.packages(packages=package_lists.non_pi, **kw) @@ -98,4 +92,9 @@ files.template(src="templates/pigpiod.service.j2", dest="/etc/systemd/system/pigpiod.service") systemd.service(service='pigpiod', daemon_reload=True, enabled=True) +desktop_env = host.name in ['dash', 'slash', 'plus', 'squib'] +if desktop_env: + apt.packages(packages=package_lists.xorg + package_lists.desktop, **kw) + pdm() + no_unwanted_services()
--- a/templates/sources.list.j2 Sat Dec 02 18:38:56 2023 -0800 +++ b/templates/sources.list.j2 Mon Dec 11 21:22:12 2023 -0800 @@ -9,28 +9,35 @@ {% endif %} {% if host.name in ['dash', 'squib', 'slash', 'dot', 'plus'] %} -deb [arch=amd64,i386 signed-by=/etc/apt/keyrings/steam.gpg] https://repo.steampowered.com/steam/ stable steam +deb [arch=amd64,i386 signed-by=/usr/share/keyrings/steam.gpg] https://repo.steampowered.com/steam/ stable steam {% endif %} -{% if host.name in ['dash', 'squib', 'bang', 'ditto', 'slash', 'plus'] %} -# podman -# see packages.py -#deb [arch=amd64 signed-by=/etc/apt/keyrings/podman.gpg] https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_22.04/ / +{% if host.name in ['bang', 'ditto', 'slash', 'plus', 'dot'] %} +deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x lunar main {% endif %} -{% if host.name in ['squib'] %} -deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x kinetic main -{% endif %} - -{% if host.name in ['dash', 'bang', 'ditto', 'slash', 'plus', 'dot'] %} -deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x lunar main +{% if host.name in ['dash', 'squib'] %} +deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main {% endif %} {% if host.name in ['ditto'] %} deb [signed-by=/etc/apt/keyrings/coral.gpg] https://packages.cloud.google.com/apt coral-edgetpu-stable main {% endif %} -{% if host.name in ['dash', 'ditto', 'bang', 'plus', 'slash', 'dot'] %} +{% if host.name in ['dash', 'squib'] %} +deb http://us.archive.ubuntu.com/ubuntu mantic main restricted +deb http://us.archive.ubuntu.com/ubuntu mantic multiverse +deb http://us.archive.ubuntu.com/ubuntu mantic universe +deb http://us.archive.ubuntu.com/ubuntu mantic-backports main restricted universe multiverse +deb http://us.archive.ubuntu.com/ubuntu mantic-security main restricted +deb http://us.archive.ubuntu.com/ubuntu mantic-security multiverse +deb http://us.archive.ubuntu.com/ubuntu mantic-security universe +deb http://us.archive.ubuntu.com/ubuntu mantic-updates main restricted +deb http://us.archive.ubuntu.com/ubuntu mantic-updates multiverse +deb http://us.archive.ubuntu.com/ubuntu mantic-updates universe +{% endif %} + +{% if host.name in ['ditto', 'bang', 'plus', 'slash', 'dot'] %} deb http://us.archive.ubuntu.com/ubuntu lunar main restricted deb http://us.archive.ubuntu.com/ubuntu lunar multiverse deb http://us.archive.ubuntu.com/ubuntu lunar universe
--- a/wireguard_pubkey.py Sat Dec 02 18:38:56 2023 -0800 +++ b/wireguard_pubkey.py Mon Dec 11 21:22:12 2023 -0800 @@ -1,6 +1,6 @@ pubkey = { 'bang': 'xDkAqfljmeVj7bB6VslxD/vVwlUh/vLXX5Wo7ZCoTQ4=', - 'dash': 'PncHsa/pKORzvfQG1N2p4HC+Srovo0hpkHZhKXLpRHA=', + 'dash': 'YqcNr+QImfHqhyYH7vUYCodaGmFJkb+XGYD8TL4Ejlk=', 'ditto': 'IaOJzsn+KK9SuNzn8lJfaD/dgu4Otp094SK0Xz4i4VA=', 'dot': '0youwd1ZHBQgbd+YUg8WdxhSqiK2rSKxmzDpf+gu4z0=', 'drew-note10': 'QMgx4cmuUTfJ7RH4Q46b54tSQl4eISOmdEney17fnE8=',