Mercurial > code > home > repos > infra
comparison apt.py @ 240:b58f05be720a
updates for new ubuntu 23.10 install
author | drewp@bigasterisk.com |
---|---|
date | Mon, 11 Dec 2023 21:22:12 -0800 |
parents | 19a7f714273c |
children | ff36727f3a10 |
comparison
equal
deleted
inserted
replaced
239:ec7b0280add3 | 240:b58f05be720a |
---|---|
18 files.file(path='/etc/apt/trusted.gpg.d/microsoft.gpg', present=False) | 18 files.file(path='/etc/apt/trusted.gpg.d/microsoft.gpg', present=False) |
19 | 19 |
20 # and it makes this, which is redundant with my sources.list template line | 20 # and it makes this, which is redundant with my sources.list template line |
21 files.file(path='/etc/apt/sources.list.d/vscode.list', present=False) | 21 files.file(path='/etc/apt/sources.list.d/vscode.list', present=False) |
22 | 22 |
23 apt.packages(packages=['curl']) | |
23 server.shell(commands=[ | 24 server.shell(commands=[ |
24 f"curl -fsSL {url} | gpg --dearmor > /etc/apt/keyrings/{name}" for (url, name) in [ | 25 f"curl -fsSL {url} | gpg --dearmor > /etc/apt/keyrings/{name}" for (url, name) in [ |
25 ('https://packages.microsoft.com/keys/microsoft.asc', 'ms.gpg'), | 26 ('https://packages.microsoft.com/keys/microsoft.asc', 'ms.gpg'), |
26 ('https://deb.nodesource.com/gpgkey/nodesource.gpg.key', 'nodesource.gpg'), | 27 ('https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key', 'nodesource.gpg'), |
27 ('https://dl.google.com/linux/linux_signing_key.pub', 'chrome.gpg'), | 28 ('https://dl.google.com/linux/linux_signing_key.pub', 'chrome.gpg'), |
28 ('https://ftp-master.debian.org/keys/archive-key-11.asc', 'bullseye.gpg'), | 29 ('https://ftp-master.debian.org/keys/archive-key-11.asc', 'bullseye.gpg'), |
29 ('https://ftp-master.debian.org/keys/archive-key-11-security.asc', 'bullseye-security.gpg'), | 30 ('https://ftp-master.debian.org/keys/archive-key-11-security.asc', 'bullseye-security.gpg'), |
30 ('https://packages.cloud.google.com/apt/doc/apt-key.gpg', 'coral.gpg'), | 31 ('https://packages.cloud.google.com/apt/doc/apt-key.gpg', 'coral.gpg'), |
31 ] | 32 ] |
39 #-rw-r--r-- 1 root root 1733 Mar 26 2021 /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg | 40 #-rw-r--r-- 1 root root 1733 Mar 26 2021 /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg |
40 | 41 |
41 dir = Path('/etc/apt/sources.list.d') | 42 dir = Path('/etc/apt/sources.list.d') |
42 | 43 |
43 | 44 |
44 def clear_known_sources_files(known=[dir / 'vscode.list']): | 45 def clear_known_sources_files(known=[ |
46 dir / 'vscode.list', | |
47 dir / 'google-chrome.list', | |
48 dir / 'steam-beta.list', | |
49 dir / 'google-chrome-unstable.list', | |
50 dir / 'steam-stable.list', | |
51 ]): | |
45 found = map(Path, host.get_fact(FindFiles, dir, quote_path=True)) | 52 found = map(Path, host.get_fact(FindFiles, dir, quote_path=True)) |
46 if set(found) - set(known): | 53 if set(found) - set(known): |
47 raise SystemExit(f"new files in {host.name} /etc/apt/sources.list.d/ - please remove") | 54 raise SystemExit(f"new files in {host.name} /etc/apt/sources.list.d/ - please remove") |
48 for f in known: | 55 for f in known: |
49 files.file(path=f, present=False) | 56 files.file(path=f, present=False) |