# HG changeset patch # User drewp@bigasterisk.com # Date 1678565876 28800 # Node ID 2065998876e4f2129687400612f0e67fa1aaca4c # Parent ee0384eebee568d2cff51c49bd54b41a1658254d add host 'ditto' diff -r ee0384eebee5 -r 2065998876e4 home.py --- a/home.py Sat Mar 11 11:22:48 2023 -0800 +++ b/home.py Sat Mar 11 12:17:56 2023 -0800 @@ -5,6 +5,7 @@ 'dash', 'slash', 'bang', + 'ditto', ]: # maybe bring sync.py in here too diff -r ee0384eebee5 -r 2065998876e4 inventory.py --- a/inventory.py Sat Mar 11 11:22:48 2023 -0800 +++ b/inventory.py Sat Mar 11 12:17:56 2023 -0800 @@ -18,6 +18,9 @@ ('dot', { 'ssh_hostname': 'dot', 'wireguard_address': '10.5.0.30', + }), + ('ditto', { + 'wireguard_address': '10.5.0.7', }) ] diff -r ee0384eebee5 -r 2065998876e4 kube.py --- a/kube.py Sat Mar 11 11:22:48 2023 -0800 +++ b/kube.py Sat Mar 11 12:17:56 2023 -0800 @@ -9,8 +9,8 @@ server_ip = "10.5.0.1" server_node = 'bang' -nodes = ['plus', 'slash', 'dash'] #, 'frontbed', 'garage'] -admin_from = ['bang', 'slash', 'dash'] +nodes = ['slash', 'dash', 'ditto'] #, 'frontbed', 'garage'] +admin_from = ['bang', 'slash', 'dash', 'ditto'] # https://github.com/k3s-io/k3s/releases # 1.23.6 per https://github.com/cilium/cilium/issues/20331 k3s_version = 'v1.24.3+k3s1' diff -r ee0384eebee5 -r 2065998876e4 net.py --- a/net.py Sat Mar 11 11:22:48 2023 -0800 +++ b/net.py Sat Mar 11 12:17:56 2023 -0800 @@ -1,8 +1,7 @@ from pyinfra import host from pyinfra.operations import apt, files, server, ssh, systemd -is_wifi = host.name in ['frontdoor', 'living', 'plus'] -is_wifi_pi = host.name in ['frontdoor'] +is_wifi = host.name in ['living', 'plus'] def cleanup(): @@ -45,9 +44,9 @@ else: server.sysctl(key='net.ipv6.conf.all.disable_ipv6', value=1, persist=True) - if is_wifi_pi: - files.put(dest="/etc/network/interfaces.d/wlan0", src="files/pi_wlan0_powersave") - ssh.command(host.name, "iw wlan0 set power_save off") + # if is_wifi_pi: + # files.put(dest="/etc/network/interfaces.d/wlan0", src="files/pi_wlan0_powersave") + # ssh.command(host.name, "iw wlan0 set power_save off") files.directory('/etc/systemd/network') if host.name == 'prime': diff -r ee0384eebee5 -r 2065998876e4 package_lists.py --- a/package_lists.py Sat Mar 11 11:22:48 2023 -0800 +++ b/package_lists.py Sat Mar 11 12:17:56 2023 -0800 @@ -76,7 +76,7 @@ 'tcpdump', ] -for_bang = [ +for_bang_ditto = [ 'dnsmasq', 'nfs-common', 'openntpd', diff -r ee0384eebee5 -r 2065998876e4 packages.py --- a/packages.py Sat Mar 11 11:22:48 2023 -0800 +++ b/packages.py Sat Mar 11 12:17:56 2023 -0800 @@ -61,8 +61,8 @@ apt.packages(packages=package_lists.general, **kw) apt.packages(packages=package_lists.debug, **kw) -if host.name == "bang": - apt.packages(packages=package_lists.for_bang, **kw) +if host.name in ["bang" ,'ditto']: + apt.packages(packages=package_lists.for_bang_ditto, **kw) if host.name == "pipe": apt.packages(packages=package_lists.for_pipe, **kw) diff -r ee0384eebee5 -r 2065998876e4 sync.py --- a/sync.py Sat Mar 11 11:22:48 2023 -0800 +++ b/sync.py Sat Mar 11 12:17:56 2023 -0800 @@ -3,8 +3,8 @@ # primary instance is in k8s (/my/serv/filesync/syncthing); the rest are run with systemd. # Configs are in ~/.config/syncthing/ on each box -if host.name in ['dash', 'dot', 'slash', 'plus', 'bang']: apt.packages(packages=['syncthing']) +if host.name in ['dash', 'dot', 'slash', 'plus', 'bang' ,'ditto']: # now we have /lib/systemd/system/syncthing@.service user = 'ari' if host.name == 'dot' else 'drewp' diff -r ee0384eebee5 -r 2065998876e4 system.py --- a/system.py Sat Mar 11 11:22:48 2023 -0800 +++ b/system.py Sat Mar 11 12:17:56 2023 -0800 @@ -111,7 +111,7 @@ if not is_pi: podman_insecure_registry() -if host.name in ['bang', 'pipe']: +if host.name in ['bang', 'pipe', 'ditto']: no_sleep() if host.name == 'bang': diff -r ee0384eebee5 -r 2065998876e4 templates/sources.list.j2 --- a/templates/sources.list.j2 Sat Mar 11 11:22:48 2023 -0800 +++ b/templates/sources.list.j2 Sat Mar 11 12:17:56 2023 -0800 @@ -35,6 +35,22 @@ deb [signed-by=/etc/apt/trusted.gpg] https://deb.nodesource.com/node_16.x jammy main {% endif %} +{% if host.name in ['ditto'] %} +deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main +deb [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam +deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main +deb http://us.archive.ubuntu.com/ubuntu kinetic main restricted +deb http://us.archive.ubuntu.com/ubuntu kinetic multiverse +deb http://us.archive.ubuntu.com/ubuntu kinetic universe +deb http://us.archive.ubuntu.com/ubuntu kinetic-backports main restricted universe multiverse +deb http://us.archive.ubuntu.com/ubuntu kinetic-security main restricted +deb http://us.archive.ubuntu.com/ubuntu kinetic-security multiverse +deb http://us.archive.ubuntu.com/ubuntu kinetic-security universe +deb http://us.archive.ubuntu.com/ubuntu kinetic-updates main restricted +deb http://us.archive.ubuntu.com/ubuntu kinetic-updates multiverse +deb http://us.archive.ubuntu.com/ubuntu kinetic-updates universe +{% endif %} + {% if host.name in ['slash'] %} deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main deb [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam diff -r ee0384eebee5 -r 2065998876e4 templates/wireguard/wg0.conf.j2 --- a/templates/wireguard/wg0.conf.j2 Sat Mar 11 11:22:48 2023 -0800 +++ b/templates/wireguard/wg0.conf.j2 Sat Mar 11 12:17:56 2023 -0800 @@ -18,6 +18,7 @@ {{ peer_block('slash', 'dZSvwUPLKPrBWY66o8GNeWCcol6lK5QG80HLtOnCRko=', '10.5.0.6/32') }} {{ peer_block('pipe', 'yI0zt8/+baHjadhiBCX6u8sSkhjoh/Q5cIZkGf1H6S4=', '10.5.0.3/32') }} {{ peer_block('plus', 'tH2og4BbXaH6BrHSBd73Fx1XT0DxR8vjQxjqHFa913A=', '10.5.0.110/32') }} + {{ peer_block('ditto', 'IaOJzsn+KK9SuNzn8lJfaD/dgu4Otp094SK0Xz4i4VA=', '10.5.0.7/32') }} {% elif host.name == 'prime' %} {{ peer_block('bang', 'xDkAqfljmeVj7bB6VslxD/vVwlUh/vLXX5Wo7ZCoTQ4=', '10.5.0.0/24') }} {{ peer_block('drew-note10', 'QMgx4cmuUTfJ7RH4Q46b54tSQl4eISOmdEney17fnE8=', '10.5.0.112/32') }}