docker module requirements met, but ansible misses docker-py

Hello everybody,

got 2 Servers with docker and ansible requirements to manipulate them. But at server B , ansible doent find docker-py allthough it is installed. The versions of the installed softwares differ, so i guess there is the problem.

Server A(working):
python2.7
docker_py-1.7.2.egg-info
Server:
Version: 1.10.3
API version: 1.22
Go version: go1.5.3
Git commit: 20f81dd
Built: Thu Mar 10 15:48:06 2016
OS/Arch: linux/amd64

Server B(not working):
python2.7
docker_py-1.8.0.egg-info
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.3
Git commit: a34a1d5
Built: Fri Nov 20 17:56:04 UTC 2015
OS/Arch: linux/amd64

If i try then to start a container through ansible i got the error:
fatal: [HOST]: FAILED! => {“changed”: false, “failed”: true, “msg”: “docker-py doesn’t seem to be installed, but is required for the Ansible Docker module.”}

Any ideas? If you need more specific information let me know and excuse my bad english :smiley:

Greetings,
Götz

Hi,

I have the same issue.
Any solution ?

You are probably not executing the same version of python that has docker-py installed.

Hey did you figure it out. I have the same problem: specs below:

pip -V
pip 8.1.2 from /usr/lib/python2.6/site-packages (python 2.6)

pip freeze |grep docker
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
docker-compose==1.7.1
docker-py==1.8.1
dockerpty==0.4.1

error message below:
: FAILED! => {“changed”: false, “failed”: true, “msg”: “docker-py doesn’t seem to be installed, but is required for the Ansible Docker module.”}

Found a work around, by adding specifics of pip and docker-py to the playbook