# HG changeset patch # User drewp@bigasterisk.com # Date 1671656972 28800 # Node ID 168bc1c44e6f886d37681abea7ecd75c6e81a746 # Parent 84701dafa7c33b0c99faf70f79e3458108caeb93 stop telling arm machines to get i386 pkgs diff -r 84701dafa7c3 -r 168bc1c44e6f system.py --- a/system.py Wed Dec 21 12:48:40 2022 -0800 +++ b/system.py Wed Dec 21 13:09:32 2022 -0800 @@ -3,6 +3,7 @@ from pyinfra import host from pyinfra.facts.server import LinuxDistribution from pyinfra.facts.files import FindFiles +from pyinfra.facts.server import Arch from pyinfra.operations import apt, files, server, systemd is_pi = host.get_fact(LinuxDistribution)['name'] in ['Debian', 'Raspbian GNU/Linux'] @@ -16,7 +17,8 @@ files.replace(path='/etc/timezone', text='.*', replace=TZ) def apt_sources(): - server.shell(commands=['dpkg --add-architecture i386']) + if host.get_fact(Arch) == 'x86_64': + server.shell(commands=['dpkg --add-architecture i386']) files.template(src='templates/sources.list.j2', dest='/etc/apt/sources.list.j2') if host.get_fact(FindFiles, '/etc/apt/sources.list.d/', quote_path=True): diff -r 84701dafa7c3 -r 168bc1c44e6f templates/sources.list.j2 --- a/templates/sources.list.j2 Wed Dec 21 12:48:40 2022 -0800 +++ b/templates/sources.list.j2 Wed Dec 21 13:09:32 2022 -0800 @@ -73,6 +73,7 @@ deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates multiverse deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates universe +deb http://ppa.launchpad.net/hardkernel/ppa/ubuntu jammy main {% endif %} {% if host.name in ['garage'] %}