Error:
{"changed": false, "failed": true, "msg": "Failed to import docker-py - No module named types. Trypip install docker-py"}
That's weird. docker.types is present and declared in setup.py. Installing and importing it in a fresh virtualenv also doesn't seem to raise any issue. Are there more details you can share on what's triggering the issue?
This _should_ reproduce it:
- hosts: my_host
roles:
- angstwad.docker_ubuntu
- hosts: my_host
tasks:
- name: login
docker_login:
username: foo
password: bar
email: [email protected]
Temporary fix
Downgrade to 1.9.0:
roles:
- { role: angstwad.docker_ubuntu, pip_version_docker_py: 1.9.0 }
+1
+1
I guess I broke this https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/docker_common.py#L38 - my bad. I'll see if I can release a 1.10.1 with a fix.
Hey folks, I just pushed 1.10.1 to pypi, can you try to upgrade and check that it solves the issue? Thanks!
Hi @shin- I get this with latest ansible and docker-py 1.10.1 running on OSX (think it's ok in linux):
Failed to import docker-py - No module named requests.exceptions.
Any ideas? Thanks
Most helpful comment
Hi @shin- I get this with latest ansible and docker-py 1.10.1 running on OSX (think it's ok in linux):
Any ideas? Thanks