api subscription: output generic apt-auth stanza for ceph

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2025-03-28 09:48:32 +01:00
parent 0baf15ab90
commit 52f6702503

View File

@ -103,6 +103,9 @@ sub write_etc_subscription {
$ceph_auth .= "machine enterprise.proxmox.com/debian/ceph-${ceph_release}"
." login $info->{key} password $info->{serverid}\n"
}
# add a generic one to handle the case where a new ceph release was made available while
# the subscription info was not yet updated, and as per APT_AUTH.CONF(5) start-with matches.
$ceph_auth .= "machine enterprise.proxmox.com/debian/ceph login $info->{key} password $info->{serverid}\n"
PVE::Tools::file_set_contents("/etc/apt/auth.conf.d/ceph.conf", $ceph_auth);
}
}