dockers module issues

631 views
Skip to first unread message

William Muriithi

unread,
Apr 19, 2017, 7:32:25 PM4/19/17
to ansible...@googlegroups.com
Hello,

Would really appreciate pointer here as I have run to a hard wall.  I am trying to use ansible to manage and configure docker.  So I started on a google search and noticed ansible already has some support for dockers.

However, I don't seem to get past that.  Since I added that task sometime at 12 PM today, I have been having this error;

fatal: [fluorine.eng.example.com]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to import docker-py - No module named requests.exceptions. Try `pip install docker-py`"}

Docker-py is however already installed.  Anybody using this module who have a pointer?  Would really be grateful for any help.

william@cacti ~]$ ansible --version
/usr/lib64/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
  DeprecationWarning
ansible 2.2.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
[william@cacti ~]$

[william@cacti ~]$ cat /etc/redhat-release
CentOS release 6.8 (Final)
[william@cacti ~]$


[william@cacti ~]$ sudo pip install docker-py
[sudo] password for william:
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
Requirement already satisfied: docker-py in /usr/lib/python2.6/site-packages
Requirement already satisfied: websocket-client>=0.32.0 in /usr/lib/python2.6/site-packages (from docker-py)
Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/lib/python2.6/site-packages (from docker-py)
Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /usr/lib/python2.6/site-packages (from docker-py)
Requirement already satisfied: six>=1.4.0 in /usr/lib/python2.6/site-packages (from docker-py)
Requirement already satisfied: requests!=2.11.0,>=2.5.2 in /usr/lib/python2.6/site-packages (from docker-py)
Requirement already satisfied: docker-pycreds>=0.2.1 in /usr/lib/python2.6/site-packages (from docker-py)
Requirement already satisfied: argparse in /usr/lib/python2.6/site-packages (from websocket-client>=0.32.0->docker-py)

 
Regards,
William

Sander Smeenk

unread,
Apr 20, 2017, 10:29:54 AM4/20/17
to ansible...@googlegroups.com
Quoting William Muriithi (william....@gmail.com):

> fatal: [fluorine.eng.example.com]: FAILED! => {"changed": false, "failed":
> true, "msg": "Failed to import docker-py - No module named
> requests.exceptions. Try `pip install docker-py`"}
>
> Docker-py is however already installed.

[ .. ]

> [william@cacti ~]$ sudo pip install docker-py
> Requirement already satisfied: docker-py

The docker-py package is needed on the host that is actually running the
task: fluorine.eng.example.com. Or you need to 'delegate' the task
depending on the 'docker-py' package to your localhost: cacti.

HTH,
-Sndr.
--
| Crowded elevator smell different to midget.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
Reply all
Reply to author
Forward
0 new messages