Mercurial > code > home > repos > infra
comparison apt.py @ 278:4e424a144183
for netboot pi
author | drewp@bigasterisk.com |
---|---|
date | Sat, 30 Mar 2024 00:15:46 -0700 |
parents | 0ed4add0b1a4 |
children | 5c5c314051c5 |
comparison
equal
deleted
inserted
replaced
277:ce823a167641 | 278:4e424a144183 |
---|---|
4 from pyinfra.facts.server import Arch, LinuxDistribution | 4 from pyinfra.facts.server import Arch, LinuxDistribution |
5 from pyinfra.operations import apt, files, server | 5 from pyinfra.operations import apt, files, server |
6 | 6 |
7 TZ = 'America/Los_Angeles' | 7 TZ = 'America/Los_Angeles' |
8 | 8 |
9 is_pi = host.get_fact(LinuxDistribution)['name'] in ['Debian', 'Raspbian GNU/Linux'] | |
9 | 10 |
10 def pkg_keys(): | 11 def pkg_keys(): |
11 files.directory(path='/etc/apt/keyrings/') # for raspi | 12 files.directory(path='/etc/apt/keyrings/') # for raspi |
12 for url, name in [ | 13 for url, name in [ |
13 ('https://repo.steampowered.com/steam/archive/stable/steam.gpg', 'steam.gpg'), | 14 ('https://repo.steampowered.com/steam/archive/stable/steam.gpg', 'steam.gpg'), |
32 ('https://packages.cloud.google.com/apt/doc/apt-key.gpg', 'coral.gpg'), | 33 ('https://packages.cloud.google.com/apt/doc/apt-key.gpg', 'coral.gpg'), |
33 ('https://hub.unity3d.com/linux/keys/public', 'unityhub.gpg'), | 34 ('https://hub.unity3d.com/linux/keys/public', 'unityhub.gpg'), |
34 ('https://nvidia.github.io/libnvidia-container/gpgkey', 'nvidia.gpg'), | 35 ('https://nvidia.github.io/libnvidia-container/gpgkey', 'nvidia.gpg'), |
35 ] | 36 ] |
36 ]) | 37 ]) |
37 if host.get_fact(Arch) == 'armv7l' or host.name == 'bang': # I mean raspbian/debian | 38 if is_pi or host.name == 'bang': # I mean raspbian/debian |
38 # this contaminates the apt-update | 39 # this contaminates the apt-update |
39 files.file(path="/etc/apt/trusted.gpg.d/podman.asc", present=False) | 40 files.file(path="/etc/apt/trusted.gpg.d/podman.asc", present=False) |
40 | 41 |
41 # also these | 42 # also these |
42 #-rw-r--r-- 1 root root 2794 Mar 26 2021 /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg | 43 #-rw-r--r-- 1 root root 2794 Mar 26 2021 /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg |