-
-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Further backwards compatibility issues with recent apt file name and GPG changes #470
Comments
Hi @gygitlab Thanks for putting this together. I just hit this exact issue myself. I had run this role a long time ago to install Docker. Maybe we could add a task to check if For now I've just added a # ...
# https://github.com/geerlingguy/ansible-role-docker/issues/470
- name: Remove /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list
become: true
ansible.builtin.file:
path: /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list
state: absent |
@dbrennand no problem. That could indeed work. Certainly cleaning up any old package lists created by the role would seem prudent. |
As called out in #436 there's been some recent changes to GPG key locations and apt config. Additionally last year the filename for the apt config was changed to
docker.list
in #369.The change to the GPG key location did cause some backwards compatibility issues that were addressed in #461 but it appears there are still some knock ons for longer running systems, specifically ones that ran on versions of the role before the name change due to the way Ansible's
apt_repository
works.Specifically, while the file name is changed if the apt config already exists
apt_repository
appears to leave it be. This in turn means running on such a system results in the following config:apt
funny enough accepts this config, albeit with multipleconfigured multiple times
warnings. Note that there's two entries here as the original GPG config was added previously.The problem is when the config has been subsequently changed as what happened recently with the GPG path change. In this case
apt_repository
then detects a change and attempts to update the config but in the new file location as it's configured. This creates the following config as a result.apt
does not accept this:For more graceful handling extending #461 to handle all previous versions of the file may be the best approach here for older users?
The text was updated successfully, but these errors were encountered: