geerlingguy / ansible-role-docker

Ansible Role - Docker
https://galaxy.ansible.com/geerlingguy/docker/
MIT License
1.8k stars 851 forks source link

No luck with this role on ubuntu-24.04-minimal-cloudimg-amd64.img #452

Closed mcfrojd closed 3 months ago

mcfrojd commented 3 months ago

Error when i try to install docker using this role. When i try to run the role on a VM buildt from ubuntu-24.04-minimal-cloudimg-amd64.img. I get these 2 errors:

FAILED! => {"changed": false, "dest": "/etc/apt/trusted.gpg.d/docker.asc", "elapsed": 0, "msg": "An unknown error occurred: 'CustomHTTPSConnection' object has no attribute 'cert_file'", "url": "https://download.docker.com/linux/ubuntu/gpg"}
...ignoring
FAILED! => {"changed": false, "msg": "Failed to update apt cache: W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., W:GPG error: https://download.docker.com/linux/ubuntu noble InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8, E:The repository 'https://download.docker.com/linux/ubuntu noble InRelease' is not signed."}

If i use the official guide from https://docs.docker.com/engine/install/ubuntu/ to install the docker engine "using the apt repository", i have to change the variable "VERSION_CODENAME" to "UBUNTU_CODENAME" to make the install work.

If i run the install from dockers "convenience script" it works right away.

Anyone have any suggestions on how to modify this role to make it work?

mcfrojd commented 3 months ago

I was running ansible core version 2.12.3 This seems to have been my problem! After testing on core version 2.16.6 everything worked fine.