I have this:

- hosts: all
  connection: docker
  tasks:
    - command: do_some_command

I tried the connection: docker, but got this:

The error was: CalledProcessError: Command '['/usr/local/bin/docker', 
'version']' returned non-zero exit status 1


On my host, Ubuntu Trusty Tahr, installed docker 
using https://apt.dockerproject.org/repo method (documented on docker), and 
it installs docker binary in /usr/bin/docker


The full traceback


An exception occurred during task execution. The full traceback is:

Traceback (most recent call last):

  File 
"/usr/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", 
line 124, in run

    res = self._execute()

  File 
"/usr/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", 
line 411, in _execute

    self._connection = self._get_connection(variables=variables, 
templar=templar)

  File 
"/usr/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", 
line 636, in _get_connection

    connection = self._shared_loader_obj.connection_loader.get(conn_type, 
self._play_context, self._new_stdin)

  File 
"/usr/local/lib/python2.7/site-packages/ansible/plugins/__init__.py", line 
349, in get

    obj = obj(*args, **kwargs)

  File 
"/usr/local/lib/python2.7/site-packages/ansible/plugins/connection/docker.py", 
line 77, in __init__

    docker_version = self._get_docker_version()

  File 
"/usr/local/lib/python2.7/site-packages/ansible/plugins/connection/docker.py", 
line 116, in _get_docker_version

    cmd_output = subprocess.check_output(cmd)

  File 
"/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
 
line 574, in check_output

    raise CalledProcessError(retcode, cmd, output=output)

CalledProcessError: Command '['/usr/local/bin/docker', 'version']' returned 
non-zero exit status 1

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2ddad244-9c3b-4083-bf82-d4a9572dddc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to