fix: repo rewrites are necessary anyway

This commit is contained in:
2024-09-29 18:11:11 +02:00
parent bda1bc6ea6
commit 5f2eb0aea1
3 changed files with 20 additions and 0 deletions

1
.shellcheckrc Normal file
View File

@@ -0,0 +1 @@
external-sources=true

18
provisioners/update.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -euxo pipefail
# configure apt for non-interactive mode.
export DEBIAN_FRONTEND=noninteractive
# switch to the non-enterprise repository.
# see https://pve.proxmox.com/wiki/Package_Repositories
dpkg-divert --divert /etc/apt/sources.list.d/pve-enterprise.list.distrib.disabled --rename --add /etc/apt/sources.list.d/pve-enterprise.list
dpkg-divert --divert /etc/apt/sources.list.d/ceph.list.distrib.disabled --rename --add /etc/apt/sources.list.d/ceph.list
echo "deb http://download.proxmox.com/debian/pve $(. /etc/os-release && echo "$VERSION_CODENAME") pve-no-subscription" >/etc/apt/sources.list.d/pve.list
echo "deb http://download.proxmox.com/debian/ceph-reef $(. /etc/os-release && echo "$VERSION_CODENAME") no-subscription" >/etc/apt/sources.list.d/ceph.list
# switch the apt mirror from us to nl.
sed -i -E 's,ftp\.us\.debian,ftp.nl.debian,' /etc/apt/sources.list
# update only (no upgrade since we want to use this image to test automated cluster upgrades)
apt-get update

View File

@@ -72,6 +72,7 @@ variable "shell_provisioner_scripts" {
default = [
"provisioners/apt_proxy.sh",
"provisioners/network.sh",
"provisioners/update.sh",
"provisioners/localisation-ch.sh",
"provisioners/reboot.sh",
"provisioners/provision.sh",