nickjj / ansible-docker

Install / Configure Docker and Docker Compose using Ansible.
MIT License
750 stars 224 forks source link

Support Ubuntu 20.04 LTS #82

Closed shadow1runner closed 4 years ago

shadow1runner commented 4 years ago

@nickjj thanks for your hard work on this role; I think you are aware that it isn't supporting 20.04 LTS yet due to docker not publishing public focal packages yet [1]. My question is whether you are thinking about supporting it (for example by using bionic instead as outlined in [2]), or whether you want to wait for Docker to publish public packages? Right now it fails at this step:

TASK [nickjj.docker : Configure Docker's upstream APT repository] ***************************************************************************************************************************task path: /home/helli/.ansible/roles/nickjj.docker/tasks/main.yml:27
The full traceback is:
  File "/tmp/ansible_apt_repository_payload_mjo5emml/ansible_apt_repository_payload.zip/ansible/modules/packaging/os/apt_repository.py", line 548, in main
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 591, in update
    raise FetchFailedException(e)
fatal: [#removed#]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "codename": null,
            "filename": null,
            "install_python_apt": true,
            "mode": null,
            "repo": "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\n",
            "state": "present",
            "update_cache": true,
            "validate_certs": true
        }
    },
    "msg": "apt cache update failed"
}

Thanks!

Edit: additional info, typos

[1] https://download.docker.com/linux/ubuntu/dists/ [2] https://askubuntu.com/a/1230190

nickjj commented 4 years ago

Hi,

I'd like to wait until it's officially supported by Docker.

But I totally understand wanting to use 20.04 right away.

I'm going to ask Docker to see when they plan to support it. Hopefully it's in the near future.

For now, let's leave this issue open until it's officially supported.

shadow1runner commented 4 years ago

Thank you for your quick response! Meanwhile I've found a workaround by overriding docker__apt_key_url and docker__apt_repository like so:

docker__apt_repository: "deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution  | lower }} bionic {{ docker__channel | join (' ') }}"
nickjj commented 4 years ago

Looks like it'll be available in the next patch release, which is referenced at https://github.com/docker/roadmap/issues/83.

No exact ETA but soon'ish.

StefanScherer commented 4 years ago

Docker 19.03.9 is released, with packages for Ubuntu Focal Fossa. Thanks for you patience. Enjoy!

nickjj commented 4 years ago

Thanks @StefanScherer.

I just pushed v2.0.0 to the Ansible Galaxy which has a few goodies, including support for Ubuntu 20.04.