mirror of
https://github.com/RWejlgaard/pez-infra.git
synced 2026-10-31 19:11:03 +00:00
Fix apt sources on london-b and the Proxmox hosts (#150)
The first scheduled deploy failed on london-b because GitHub's gh apt signing key expired on 2026-09-05. The common role now refreshes the keyring from upstream wherever the github-cli repo is configured. The proxmox_ve role was still writing a bookworm no-subscription source onto hosts that are now trixie / PVE 9. I've switched it to a deb822 proxmox.sources using the host's release, and it cleans up the old .list plus the enterprise repos in both formats.
This commit is contained in:
parent
b70a3fb244
commit
f1421c6946
2 changed files with 39 additions and 10 deletions
|
|
@ -2,6 +2,24 @@
|
|||
# Common baseline for all Linux hosts.
|
||||
# Installs core packages, configures SSH, sets up the shell environment.
|
||||
|
||||
# GitHub's gh apt signing key expired on 2026-09-05 and was replaced upstream.
|
||||
# Hosts with the repo configured kept the stale keyring, so apt update failed
|
||||
# (NO_PUBKEY) and took the whole deploy down. Keep the keyring in sync with
|
||||
# upstream wherever the repo exists; get_url only reports a change when the
|
||||
# key actually differs.
|
||||
- name: Detect GitHub CLI apt source
|
||||
ansible.builtin.stat:
|
||||
path: /etc/apt/sources.list.d/github-cli.list
|
||||
register: common_github_cli_source
|
||||
|
||||
- name: Refresh GitHub CLI apt keyring
|
||||
ansible.builtin.get_url:
|
||||
url: https://cli.github.com/packages/githubcli-archive-keyring.gpg
|
||||
dest: /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
mode: '0644'
|
||||
force: true
|
||||
when: common_github_cli_source.stat.exists
|
||||
|
||||
- name: Update apt cache
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
|
|
|
|||
|
|
@ -1,22 +1,33 @@
|
|||
---
|
||||
# Configure Proxmox VE apt sources for the no-subscription tier.
|
||||
# Removes the enterprise repo (requires paid subscription) and enables
|
||||
# Removes the enterprise repos (require a paid subscription) and enables
|
||||
# the free no-subscription repo so apt update works without credentials.
|
||||
|
||||
- name: Remove PVE enterprise apt source
|
||||
# PVE 9 (trixie) uses deb822 .sources files. Clear out the enterprise repos in
|
||||
# both formats, plus the old one-line no-subscription .list this role used to
|
||||
# write with a hardcoded bookworm suite (mixing suites on a trixie host).
|
||||
- name: Remove enterprise and legacy Proxmox apt sources
|
||||
ansible.builtin.file:
|
||||
path: /etc/apt/sources.list.d/pve-enterprise.list
|
||||
state: absent
|
||||
|
||||
- name: Remove Ceph enterprise apt source
|
||||
ansible.builtin.file:
|
||||
path: /etc/apt/sources.list.d/ceph.list
|
||||
path: "/etc/apt/sources.list.d/{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- pve-enterprise.list
|
||||
- pve-enterprise.sources
|
||||
- ceph.list
|
||||
- ceph.sources
|
||||
- pve.sources
|
||||
- pve-no-subscription.list
|
||||
notify: Update apt cache
|
||||
|
||||
- name: Add PVE no-subscription apt source
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/apt/sources.list.d/pve-no-subscription.list
|
||||
content: "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription\n"
|
||||
dest: /etc/apt/sources.list.d/proxmox.sources
|
||||
content: |
|
||||
Types: deb
|
||||
URIs: http://download.proxmox.com/debian/pve
|
||||
Suites: {{ ansible_facts['distribution_release'] }}
|
||||
Components: pve-no-subscription
|
||||
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue