<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Bug</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">docker_service_module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.1.0"><pre class="notranslate"><code class="notranslate">ansible 2.2.1.0
</code></pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">ubntu 16.04 LTS</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Whene I try to use docker_service module I get an error about docker-compose.<br>
In my machine I've install docker, docker-compose and docker has port 4243 enabled for API</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
- hosts: all
  user: root
  vars:
    username: claudio
    password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    public_key: ~/.ssh/id_rsa.pub
  tasks:
    - name: cloning repo
      become: yes
      become_user: manager
      git:
        repo=git@bitbucket.org:xxxxx/xxxxxxxxxxx.git
        dest=/home/manager/project
        accept_hostkey=yes
        version=master
        force=yes
           recursive=no
           key_file=/home/manager/.ssh/id_rsa
- hosts: local
  user: root
  vars:
    username: claudio
    password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    public_key: ~/.ssh/id_rsa.pub
  tasks:
    - name: docker system
      become: yes
      become_user: manager
      docker_service:
        project_src: /home/manager/project/conf_default
        state: present
"><pre class="notranslate"><code class="notranslate">---
- hosts: all
  user: root
  vars:
    username: claudio
    password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    public_key: ~/.ssh/id_rsa.pub
  tasks:
    - name: cloning repo
      become: yes
      become_user: manager
      git:
        repo=git@bitbucket.org:xxxxx/xxxxxxxxxxx.git
        dest=/home/manager/project
        accept_hostkey=yes
        version=master
        force=yes
           recursive=no
           key_file=/home/manager/.ssh/id_rsa
- hosts: local
  user: root
  vars:
    username: claudio
    password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    public_key: ~/.ssh/id_rsa.pub
  tasks:
    - name: docker system
      become: yes
      become_user: manager
      docker_service:
        project_src: /home/manager/project/conf_default
        state: present

</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using /home/manager/project/ansible/ansible.cfg as config file

PLAY [all] *********************************************************************

TASK [setup] *******************************************************************
ok: [xxx.xxx.xxx.xxx]
ok: [xxx.xxx.xxx.xxx]

TASK [cloning repo] ************************************************************
ok: [xxx.xxx.xxx.xxx] =&gt; {&quot;after&quot;: &quot;4ff912eaf4a81f83ebf19ef5e871ac15c9ff9177&quot;, &quot;before&quot;: &quot;4ff912eaf4a81f83ebf19ef5e871ac15c9ff9177&quot;, &quot;changed&quot;: false, &quot;warnings&quot;: []}
ok: [xxx.xxx.xxx.xxx] =&gt; {&quot;after&quot;: &quot;4ff912eaf4a81f83ebf19ef5e871ac15c9ff9177&quot;, &quot;before&quot;: &quot;4ff912eaf4a81f83ebf19ef5e871ac15c9ff9177&quot;, &quot;changed&quot;: false, &quot;warnings&quot;: []}

PLAY [local] *******************************************************************

TASK [setup] *******************************************************************
ok: [xxx.xxx.xxx.xxx]

TASK [docker system] ***********************************************************
fatal: [xxx.xxx.xxx.xxx]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;msg&quot;: &quot;Unable to load docker-compose. Try `pip install docker-compose`. Error: cannot import name IPAMConfig&quot;}
	to retry, use: --limit @/home/manager/control-methods/ansible/provision.retry

PLAY RECAP *********************************************************************
xxx.xxx.xxx.xxx             : ok=2    changed=0    unreachable=0    failed=0   
xxx.xxx.xxx.xxx            : ok=3    changed=0    unreachable=0    failed=1 
"><pre class="notranslate"><code class="notranslate">Using /home/manager/project/ansible/ansible.cfg as config file

PLAY [all] *********************************************************************

TASK [setup] *******************************************************************
ok: [xxx.xxx.xxx.xxx]
ok: [xxx.xxx.xxx.xxx]

TASK [cloning repo] ************************************************************
ok: [xxx.xxx.xxx.xxx] =&gt; {"after": "4ff912eaf4a81f83ebf19ef5e871ac15c9ff9177", "before": "4ff912eaf4a81f83ebf19ef5e871ac15c9ff9177", "changed": false, "warnings": []}
ok: [xxx.xxx.xxx.xxx] =&gt; {"after": "4ff912eaf4a81f83ebf19ef5e871ac15c9ff9177", "before": "4ff912eaf4a81f83ebf19ef5e871ac15c9ff9177", "changed": false, "warnings": []}

PLAY [local] *******************************************************************

TASK [setup] *******************************************************************
ok: [xxx.xxx.xxx.xxx]

TASK [docker system] ***********************************************************
fatal: [xxx.xxx.xxx.xxx]: FAILED! =&gt; {"changed": false, "failed": true, "msg": "Unable to load docker-compose. Try `pip install docker-compose`. Error: cannot import name IPAMConfig"}
	to retry, use: --limit @/home/manager/control-methods/ansible/provision.retry

PLAY RECAP *********************************************************************
xxx.xxx.xxx.xxx             : ok=2    changed=0    unreachable=0    failed=0   
xxx.xxx.xxx.xxx            : ok=3    changed=0    unreachable=0    failed=1 

</code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<p dir="auto"><code class="notranslate">docker_container</code></p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.0 (devel 216e2c8813) last updated 2017/01/20 09:22:29 (GMT +000)
ansible 2.2.0.0 (detached HEAD cdec853e37) last updated 2017/01/20 09:25:31 (GMT +000)"><pre class="notranslate"><code class="notranslate">ansible 2.3.0 (devel 216e2c8813) last updated 2017/01/20 09:22:29 (GMT +000)
ansible 2.2.0.0 (detached HEAD cdec853e37) last updated 2017/01/20 09:25:31 (GMT +000)
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">Nothing changed</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">Linux machine1 3.16.0-4-amd64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3525390" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/1" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/1/hovercard" href="https://github.com/ansible/ansible/issues/1">#1</a> SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux</p>
<p dir="auto">pip list:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
backports.ssl-match-hostname (3.5.0.1)
cached-property (1.3.0)
chardet (2.3.0)
colorama (0.3.7)
defusedxml (0.4.1)
docker (2.0.2)
docker-compose (1.10.0)
docker-py (1.10.6)
docker-pycreds (0.2.1)
dockerpty (0.4.1)
docopt (0.6.2)
docutils (0.12)
enum34 (1.1.6)
functools32 (3.2.3.post2)
iotop (0.6)
ipaddress (1.0.18)
jsonschema (2.5.1)
Pillow (2.6.1)
pip (9.0.1)
Pygments (2.0.1)
python-apt (0.9.3.12)
python-debian (0.1.27)
python-debianbts (1.11)
PyYAML (3.12)
reportbug (6.6.3)
requests (2.11.1)
roman (2.0.0)
setuptools (5.5.1)
six (1.10.0)
SOAPpy (0.12.22)
texttable (0.8.7)
websocket-client (0.40.0)
wstools (0.4.3)"><pre class="notranslate"><code class="notranslate">pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
backports.ssl-match-hostname (3.5.0.1)
cached-property (1.3.0)
chardet (2.3.0)
colorama (0.3.7)
defusedxml (0.4.1)
docker (2.0.2)
docker-compose (1.10.0)
docker-py (1.10.6)
docker-pycreds (0.2.1)
dockerpty (0.4.1)
docopt (0.6.2)
docutils (0.12)
enum34 (1.1.6)
functools32 (3.2.3.post2)
iotop (0.6)
ipaddress (1.0.18)
jsonschema (2.5.1)
Pillow (2.6.1)
pip (9.0.1)
Pygments (2.0.1)
python-apt (0.9.3.12)
python-debian (0.1.27)
python-debianbts (1.11)
PyYAML (3.12)
reportbug (6.6.3)
requests (2.11.1)
roman (2.0.0)
setuptools (5.5.1)
six (1.10.0)
SOAPpy (0.12.22)
texttable (0.8.7)
websocket-client (0.40.0)
wstools (0.4.3)
</code></pre></div>
<p dir="auto">python --version<br>
<code class="notranslate">Python 2.7.9</code></p>
<p dir="auto">docker info</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.12.3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 0
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge null overlay host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.963 GiB
Name: machine1
ID: PD6F:VQDI:VAK4:O3YU:PWDT:HFAG:T3Z4:FNP5:QLT7:C3TO:7OKS:OODH
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
Insecure Registries:
 127.0.0.0/8"><pre class="notranslate"><code class="notranslate">Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.12.3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 0
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge null overlay host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.963 GiB
Name: machine1
ID: PD6F:VQDI:VAK4:O3YU:PWDT:HFAG:T3Z4:FNP5:QLT7:C3TO:7OKS:OODH
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
Insecure Registries:
 127.0.0.0/8
</code></pre></div>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When module <code class="notranslate">docker_container</code> is used, it fails every time with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;Failed to import docker-py - cannot import name Client. Try `pip install docker-py`&quot;"><pre class="notranslate"><code class="notranslate">"Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"
</code></pre></div>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  - docker_container:
      image: hello-world
      name: hello"><pre class="notranslate"><code class="notranslate">  - docker_container:
      image: hello-world
      name: hello
</code></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Image is executed.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [docker-registry : docker_container] **************************************
task path: /vagrant/service-playbooks/roles/docker-registry/tasks/registry-server.yml:56
Using module file /home/vagrant/ansible/lib/ansible/modules/core/cloud/docker/docker_container.py
&lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy
&lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.201 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817 `&quot; &amp;&amp; echo ansible-tmp-1484904632.51-163570270155817=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;''
&lt;192.168.77.201&gt; PUT /tmp/tmpeXfDvf TO /home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/docker_container.py
&lt;192.168.77.201&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.77.201]'
&lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy
&lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.201 '/bin/sh -c '&quot;'&quot;'chmod u+x /home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/ /home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/docker_container.py &amp;&amp; sleep 0'&quot;'&quot;''
&lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy
&lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.77.201 '/bin/sh -c '&quot;'&quot;'/usr/bin/python /home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/docker_container.py; rm -rf &quot;/home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'&quot;'&quot;''
fatal: [machine_1]: FAILED! =&gt; {
    &quot;changed&quot;: false,
    &quot;failed&quot;: true,
    &quot;invocation&quot;: {
        &quot;module_args&quot;: {
            &quot;api_version&quot;: null,
            &quot;blkio_weight&quot;: null,
            &quot;cacert_path&quot;: null,
            &quot;capabilities&quot;: null,
            &quot;cert_path&quot;: null,
            &quot;cleanup&quot;: false,
            &quot;command&quot;: null,
            &quot;cpu_period&quot;: null,
            &quot;cpu_quota&quot;: null,
            &quot;cpu_shares&quot;: null,
            &quot;cpuset_cpus&quot;: null,
            &quot;cpuset_mems&quot;: null,
            &quot;debug&quot;: false,
            &quot;detach&quot;: true,
            &quot;devices&quot;: null,
            &quot;dns_opts&quot;: null,
            &quot;dns_search_domains&quot;: null,
            &quot;dns_servers&quot;: null,
            &quot;docker_host&quot;: null,
            &quot;entrypoint&quot;: null,
            &quot;env&quot;: null,
            &quot;env_file&quot;: null,
            &quot;etc_hosts&quot;: null,
            &quot;exposed_ports&quot;: null,
            &quot;filter_logger&quot;: false,
            &quot;force_kill&quot;: false,
            &quot;groups&quot;: null,
            &quot;hostname&quot;: null,
            &quot;ignore_image&quot;: false,
            &quot;image&quot;: &quot;hello-world&quot;,
            &quot;interactive&quot;: false,
            &quot;ipc_mode&quot;: null,
            &quot;keep_volumes&quot;: true,
            &quot;kernel_memory&quot;: null,
            &quot;key_path&quot;: null,
            &quot;kill_signal&quot;: null,
            &quot;labels&quot;: null,
            &quot;links&quot;: null,
            &quot;log_driver&quot;: null,
            &quot;log_options&quot;: null,
            &quot;mac_address&quot;: null,
            &quot;memory&quot;: &quot;0&quot;,
            &quot;memory_reservation&quot;: null,
            &quot;memory_swap&quot;: null,
            &quot;memory_swappiness&quot;: null,
            &quot;name&quot;: &quot;hello&quot;,
            &quot;network_mode&quot;: null,
            &quot;networks&quot;: null,
            &quot;oom_killer&quot;: null,
            &quot;oom_score_adj&quot;: null,
            &quot;paused&quot;: false,
            &quot;pid_mode&quot;: null,
            &quot;privileged&quot;: false,
            &quot;published_ports&quot;: null,
            &quot;pull&quot;: false,
            &quot;purge_networks&quot;: false,
            &quot;read_only&quot;: false,
            &quot;recreate&quot;: false,
            &quot;restart&quot;: false,
            &quot;restart_policy&quot;: null,
            &quot;restart_retries&quot;: null,
            &quot;security_opts&quot;: null,
            &quot;shm_size&quot;: null,
            &quot;ssl_version&quot;: null,
            &quot;state&quot;: &quot;started&quot;,
            &quot;stop_signal&quot;: null,
            &quot;stop_timeout&quot;: null,
            &quot;timeout&quot;: null,
            &quot;tls&quot;: null,
            &quot;tls_hostname&quot;: null,
            &quot;tls_verify&quot;: null,
            &quot;trust_image_content&quot;: false,
            &quot;tty&quot;: false,
            &quot;ulimits&quot;: null,
            &quot;user&quot;: null,
            &quot;uts&quot;: null,
            &quot;volume_driver&quot;: null,
            &quot;volumes&quot;: null,
            &quot;volumes_from&quot;: null
        },
        &quot;module_name&quot;: &quot;docker_container&quot;
    },
    &quot;msg&quot;: &quot;Failed to import docker-py - cannot import name Client. Try `pip install docker-py`&quot;
}
	to retry, use: --limit @/vagrant/service-playbooks/microservice-infrastructure-no-elastic.retry"><pre class="notranslate"><code class="notranslate">TASK [docker-registry : docker_container] **************************************
task path: /vagrant/service-playbooks/roles/docker-registry/tasks/registry-server.yml:56
Using module file /home/vagrant/ansible/lib/ansible/modules/core/cloud/docker/docker_container.py
&lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy
&lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.201 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817 `" &amp;&amp; echo ansible-tmp-1484904632.51-163570270155817="` echo $HOME/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817 `" ) &amp;&amp; sleep 0'"'"''
&lt;192.168.77.201&gt; PUT /tmp/tmpeXfDvf TO /home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/docker_container.py
&lt;192.168.77.201&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.77.201]'
&lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy
&lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.77.201 '/bin/sh -c '"'"'chmod u+x /home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/ /home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/docker_container.py &amp;&amp; sleep 0'"'"''
&lt;192.168.77.201&gt; ESTABLISH SSH CONNECTION FOR USER: deploy
&lt;192.168.77.201&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=deploy -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.77.201 '/bin/sh -c '"'"'/usr/bin/python /home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/docker_container.py; rm -rf "/home/deploy/.ansible/tmp/ansible-tmp-1484904632.51-163570270155817/" &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'"'"''
fatal: [machine_1]: FAILED! =&gt; {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "api_version": null,
            "blkio_weight": null,
            "cacert_path": null,
            "capabilities": null,
            "cert_path": null,
            "cleanup": false,
            "command": null,
            "cpu_period": null,
            "cpu_quota": null,
            "cpu_shares": null,
            "cpuset_cpus": null,
            "cpuset_mems": null,
            "debug": false,
            "detach": true,
            "devices": null,
            "dns_opts": null,
            "dns_search_domains": null,
            "dns_servers": null,
            "docker_host": null,
            "entrypoint": null,
            "env": null,
            "env_file": null,
            "etc_hosts": null,
            "exposed_ports": null,
            "filter_logger": false,
            "force_kill": false,
            "groups": null,
            "hostname": null,
            "ignore_image": false,
            "image": "hello-world",
            "interactive": false,
            "ipc_mode": null,
            "keep_volumes": true,
            "kernel_memory": null,
            "key_path": null,
            "kill_signal": null,
            "labels": null,
            "links": null,
            "log_driver": null,
            "log_options": null,
            "mac_address": null,
            "memory": "0",
            "memory_reservation": null,
            "memory_swap": null,
            "memory_swappiness": null,
            "name": "hello",
            "network_mode": null,
            "networks": null,
            "oom_killer": null,
            "oom_score_adj": null,
            "paused": false,
            "pid_mode": null,
            "privileged": false,
            "published_ports": null,
            "pull": false,
            "purge_networks": false,
            "read_only": false,
            "recreate": false,
            "restart": false,
            "restart_policy": null,
            "restart_retries": null,
            "security_opts": null,
            "shm_size": null,
            "ssl_version": null,
            "state": "started",
            "stop_signal": null,
            "stop_timeout": null,
            "timeout": null,
            "tls": null,
            "tls_hostname": null,
            "tls_verify": null,
            "trust_image_content": false,
            "tty": false,
            "ulimits": null,
            "user": null,
            "uts": null,
            "volume_driver": null,
            "volumes": null,
            "volumes_from": null
        },
        "module_name": "docker_container"
    },
    "msg": "Failed to import docker-py - cannot import name Client. Try `pip install docker-py`"
}
	to retry, use: --limit @/vagrant/service-playbooks/microservice-infrastructure-no-elastic.retry
</code></pre></div>