Apt cache is not updated before Docker installation
Problem
Rola nie aktualizuje mi cache'a w apcie przed zainstalowaniem Dockera, w związku z czym nie może znaleźć aktualnej wersji:
TASK [docker : install Docker] ***********************************************************************************************************************************************************************************************
fatal: [metrics01.stg.metrics.apl.task.gda.pl]: FAILED! => {
"cache_update_time": 1674738859,
"cache_updated": false,
"changed": false
}
MSG:
no available installation candidate for docker-ce=5:23.0.1-1~ubuntu.22.04~jammy
sudo apt list -a docker-ce
Listing... Done
docker-ce/jammy 5:20.10.23~3-0~ubuntu-jammy amd64 [upgradable from: 5:20.10.14~3-0~ubuntu-jammy]
docker-ce/jammy 5:20.10.22~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.21~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.20~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.19~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.18~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.17~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.16~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.15~3-0~ubuntu-jammy amd64
docker-ce/jammy,now 5:20.10.14~3-0~ubuntu-jammy amd64 [installed,upgradable to: 5:20.10.23~3-0~ubuntu-jammy]
docker-ce/jammy 5:20.10.13~3-0~ubuntu-jammy amd64
Rozwiązanie
Po apt update
:
sudo apt list -a docker-ce
Listing... Done
docker-ce/jammy 5:23.0.1-1~ubuntu.22.04~jammy amd64 [upgradable from: 5:20.10.14~3-0~ubuntu-jammy]
docker-ce/jammy 5:23.0.0-1~ubuntu.22.04~jammy amd64
docker-ce/jammy 5:20.10.23~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.22~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.21~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.20~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.19~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.18~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.17~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.16~3-0~ubuntu-jammy amd64
docker-ce/jammy 5:20.10.15~3-0~ubuntu-jammy amd64
docker-ce/jammy,now 5:20.10.14~3-0~ubuntu-jammy amd64 [installed,upgradable to: 5:23.0.1-1~ubuntu.22.04~jammy]
docker-ce/jammy 5:20.10.13~3-0~ubuntu-jammy amd64