Mercurial > code > home > repos > infra
diff apt.py @ 309:f17d9925a2aa
ubuntu update changed sources a bit
author | drewp@bigasterisk.com |
---|---|
date | Mon, 16 Sep 2024 20:10:00 -0700 |
parents | d000aead76d4 |
children |
line wrap: on
line diff
--- a/apt.py Sat Aug 24 15:07:34 2024 -0700 +++ b/apt.py Mon Sep 16 20:10:00 2024 -0700 @@ -60,7 +60,7 @@ dir / 'raspi.list', ]): found = map(Path, cast(str, host.get_fact(FindFiles, dir, quote_path=True))) - if set(found) - set(known): + if set(found) - set(known) - {dir / 'ubuntu.sources'}: raise SystemExit(f"new files in {host.name} /etc/apt/sources.list.d/ - please remove") for f in known: files.file(path=f, present=False) @@ -72,6 +72,9 @@ files.template(src='templates/sources.list.j2', dest='/etc/apt/sources.list') + if 'big' in host.groups or 'laptop' in host.groups or 'hosted' in host.groups: + files.template(src='templates/ubuntu.sources.j2', dest='/etc/apt/sources.list.d/ubuntu.sources') + clear_known_sources_files() apt.packages(update=True, cache_time=86400,