I installed Centos7 minimal and then: ansible, docker, pip and using pip I installed docker-py.
Versions:
- Docker version 1.6.0, build 8aae715/1.6.0
- ansibl
I ran into a variation of this issue recently. It wasn't due to my using sudo
to install the module, but the other way around.
For whatever reason I opted to install docker
using pip's --user
flag and then had the unfortunate "idea" to use the -b
or --become
option.
This resulted in the "obviously" installed docker
module being unavailable to the elevated Ansible instance running my playbook. Sharing in case someone has "one of those days" and stumbles across this later on. Hope it helps you as I paid for this reminder with a good bit of "stupid tax", hopefully enough for the both of us. :)