angstwad/docker.ubuntu

'module' object has no attribute 'DEFAULT_DOCKER_API_VERSION'

Closed this issue · 7 comments

Version 1.2 of Docker-Py has broken the Ansible docker plugin. They've committed a fix, but it hasn't been released in a stable version.

In the meantime, docker.ubuntu can resolve by forcing pip to install version 1.1 of Docker.py instead of using the latest.

(See discussion: ansible/ansible#10879)

we also ran into this issue and until an ansible update is out, it renders this otherwise very useful role useless.
i'd suggest to make the versions of the pip packages using variables. so one could at least pin them to a working version.
if you like the idea, i can prepare a patch.

Honestly, I'd like to see something that by default installs the latest docker-py, but allows for optional pinning to prevent this type of issue in the future.

This issue is technically fixed in the devel branch on this issue: ansible/ansible-modules-core#1227 so we shouldn't go crazy trying to fix it in this role.

true, but the defaults for the role could be 'latest' so without interaction everything stays as it is now, but pinning to a specific version becomes an option available.

i know this is fixed in devel, but we run a "stable" version and i'd like to keep that :)
as docker and ansible are both fast moving projects, an incompatibility like that could happen anytime again.

Sure. And I agree, that's what I'd like to see -- by default, install the latest docker-py; allow optional pinning by overriding a default variable.

If you can provide a patch that does this, I'll happily accept it.

This was resolved in PR #41

thanks for merging!

I have discovered this issue and as a complete beginner it was hard to find out what is wrong. So for the future generations coming to see this issue:

The fix is to override the docker_py version in your playbook, like this:

---

- hosts: playground
  roles:
    - role: angstwad.docker_ubuntu
      pip_version_docker_py: 1.1