Closed kawadeomkar closed 3 months ago
This worked for me!
This also affects Ubuntu.
~@geerlingguy sorry for the ping but this role is currently not only not working, every time it is used and rolled out it re-breaks the docker repositories and apt update
on existing machines.~
EDIT:
Actually, although the /etc/apt/trusted.gpg.d/
path used by this role is outdated, it still works because the path to the keyfile is hardcoded into the apt repository source file:
so this doesn't even have to necessarily be changed yet. All I had to do was delete the /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list
file that was on that machine and caused the conflict. But I have no idea where that file (duplicate reference to the docker repo) came from.
EDIT2:
Yea okay I see now this was discussed in #434. The filename was changed in https://github.com/geerlingguy/ansible-role-docker/commit/c3a127134d6bde44bdd57fa1be1751f77d887614. This is a breaking change as we see by these issues and PRs, but to be fair it was changed when going from role version 6.2.0 to 7.0.0 so a new major version.
All is well if you pin your role versions and read through every commit and diff before updating...
Thank you @jantari and @geerlingguy for the information. I will update this PR and @ you again when it is ready.
Hello, apologies for the delay. I was out on vacation with limited internet connectivity. I've updated the PR to only contain edits to save to /apt/keyrings
using the original get_url
ansible command. @jantari Please take a look whenever you get the chance, thanks!
This also fix raspbian compatibility. For raspbian it is also need to change these variables:
docker_apt_arch: armhf
docker_apt_ansible_distribution: raspbian
https://docs.docker.com/engine/install/raspberry-pi-os/#install-using-the-repository
@geerlingguy sorry for the tag but could you take a look whenever you get a chance? Thanks
@geerlingguy sorry for the tag but could you take a look whenever you get a chance? Thanks
it would be pritty wonderful. I've got the same problem. Very wait when it will be merged
LGTM. Docker install script also uses /etc/apt/keyrings
.
https://github.com/geerlingguy/ansible-role-docker/issues/435
I started this issue because I faced a similar problem as https://github.com/geerlingguy/ansible-role-docker/issues/434 when adding the docker apt repository
Signed-By regarding source https://download.docker.com/linux/ubuntu/ jammy: │ /etc/apt/trusted.gpg.d/docker.asc != ,
Which I then had to fix by:and then running the changes in this branch.
I did some research and noticed that GPG keys should not be placed in
/etc/apt/trusted.gpg.d/
(please see https://github.com/geerlingguy/ansible-role-docker/issues/435)After updating the tasks to mirror the installation method in https://docs.docker.com/engine/install/debian/#install-using-the-repository, I was still getting an error:
until I noticed that the task here https://github.com/geerlingguy/ansible-role-docker/blob/8ff4a241477f5f24c718d606a2ee450b370cc47c/tasks/setup-Debian.yml#L30 was saving the GPG key in binary whereas in the docker docs, the key is converted to an ASCII-encoded format.
I updated the ansible tasks to use the fallback curl/shell method and added a few more tasks to mirror the installation method of the docker docs.
With these changes, I'm not getting any errors and able to successfully run the role on version 7.0.2.
@geerlingguy (or any maintainer) Please let me know what you think of these changes:
/etc/apt/keyrings
(as per docker) or/usr/share/keyrings
(as per debian)ansible.builtin.get_url
is preferred, I believe a task like this might be required as well directly afterwards: