docs: add troubleshooting guide for expired Debian repositories in update role
- Add section for "Hetzner InRelease repo expired" with problem description, workaround using archive repo, and solution to upgrade distro - Add section for "Debian InRelease repo expired" with similar workaround and solution steps - Include specific commands for backing up sources.list, modifying repo URLs, and disabling validity checks - Update `roles/update/README.md` to assist users encountering apt cache expiration errors
This commit is contained in:
2 files changed
+55
-1
No files matched your search
@@ -1,7 +1,6 @@
|
||||
[defaults]
|
||||
host_key_checking = False
|
||||
roles_path = ./roles
|
||||
log_path = /var/tmp/ansible.log
|
||||
callback_whitelist = profile_tasks
|
||||
stdout_callback = yaml
|
||||
display_skipped_hosts = false
|
||||
|
||||
@@ -31,3 +31,58 @@ And include it in your playbook.
|
||||
roles:
|
||||
- role: update
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Hetzner InRelease repo expired
|
||||
|
||||
**Problem**
|
||||
|
||||
When running the update task it fails with this message:
|
||||
|
||||
```
|
||||
msg: 'Failed to update apt cache: E:Release file for http://security.debian.org/debian-security/dists/bullseye-security/InRelease is expired (invalid since 1d 9h 4min 35s). Updates for this repository will not be applied., E:Release file for http://mirror.hetzner.com/debian/security/dists/bullseye-security/InRelease is expired (invalid since 1d 9h 4min 35s). Updates for this repository will not be applied.'
|
||||
```
|
||||
|
||||
**Workaround**
|
||||
|
||||
Use the archive repo.
|
||||
|
||||
```bash
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
sudo sed -i 's|deb http://security.debian.org/debian-security|#deb http://security.debian.org/debian-security|' /etc/apt/sources.list
|
||||
sudo echo "deb http://archive.debian.org/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list
|
||||
sudo echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/10no-check-valid-until
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
Upgrade the distro.
|
||||
|
||||
### Debian InRelease repo expired
|
||||
|
||||
**Problem**
|
||||
|
||||
When running the update task it fails with this message:
|
||||
|
||||
```
|
||||
'Failed to update apt cache: E:Release file for http://security.debian.org/dists/bullseye-security/InRelease is expired (invalid since 2d 9h 0min 12s). Updates for this repository will not be applied.'
|
||||
```
|
||||
|
||||
**Workaround**
|
||||
|
||||
Use the archive repo.
|
||||
|
||||
```
|
||||
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
sudo sed -i 's|http://security.debian.org/|http://archive.debian.org/debian-security|g' /etc/apt/sources.list
|
||||
sudo echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/10no-check-valid-until
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
Upgrade the distro.
|
||||
Reference in new issue
Block a user