angstwad/docker.ubuntu

docker-compose installation fails on Ubuntu 14.04

andronat opened this issue · 7 comments

Hello I'm using Vagrant to create a 14.04 VM and install docker.ubuntu:

config.vm.box = "ubuntu/trusty64"

Versions:

$ ansible-galaxy list
- angstwad.docker_ubuntu, v3.4.5

$ vagrant box list
ubuntu/trusty64         (virtualbox, 20180410.0.0)

Unfortunately the ansible playbook fails with the following message. Is this normal?

TASK [angstwad.docker_ubuntu : Install pip, setuptools, docker-py and docker-compose with pip] ***
changed: [default] => (item={u'version': u'latest', u'name': u'pip', u'install': True})
changed: [default] => (item={u'version': u'latest', u'name': u'setuptools', u'install': True})
skipping: [default] => (item={u'version': u'latest', u'name': u'docker', u'install': False})
failed: [default] (item={u'version': u'latest', u'name': u'docker-compose', u'install': True}) => {"changed": false, "cmd": "/usr/local/bin/pip install -U docker-compose", "item": {"install": true, "name": "docker-compose", "version": "latest"}, "msg": "stdout: Collecting docker-compose\n  Downloading https://files.pythonhosted.org/packages/26/d6/c2a33eb82f3bd59da803f812844e47211c353247f9dfb0938800b46af99d/docker_compose-1.21.0-py2.py3-none-any.whl (123kB)\nRequirement not upgraded as not directly required: six<2,>=1.3.0 in /usr/lib/python2.7/dist-packages (from docker-compose) (1.5.2)\nCollecting docker<4.0,>=3.2.1 (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/e4/c0/ab62cdb6117c1b9824e54f707060eb63ef7e4026d9aedf2d10853ba6df98/docker-3.2.1-py2.py3-none-any.whl (123kB)\nCollecting jsonschema<3,>=2.5.1 (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl\nCollecting backports.ssl-match-hostname>=3.5; python_version < \"3.5\" (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/76/21/2dc61178a2038a5cb35d14b61467c6ac632791ed05131dda72c20e7b9e23/backports.ssl_match_hostname-3.5.0.1.tar.gz\nCollecting cached-property<2,>=1.2.0 (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/ca/21/d793828ce0bb01baa6bed307c68466829343cc93fccc055cfbc21f774959/cached_property-1.4.2-py2.py3-none-any.whl\nCollecting ipaddress>=1.0.16; python_version < \"3.3\" (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl\nCollecting texttable<0.10,>=0.9.0 (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/02/e1/2565e6b842de7945af0555167d33acfc8a615584ef7abd30d1eae00a4d80/texttable-0.9.1.tar.gz\nCollecting requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1 (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl (88kB)\nCollecting enum34<2,>=1.0.4; python_version < \"3.4\" (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl\nCollecting docopt<0.7,>=0.6.1 (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz\nCollecting dockerpty<0.5,>=0.4.1 (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/8d/ee/e9ecce4c32204a6738e0a5d5883d3413794d7498fe8b06f44becc028d3ba/dockerpty-0.4.1.tar.gz\nRequirement not upgraded as not directly required: PyYAML<4,>=3.10 in /usr/lib/python2.7/dist-packages (from docker-compose) (3.10)\nCollecting websocket-client<1.0,>=0.32.0 (from docker-compose)\n  Downloading https://files.pythonhosted.org/packages/9d/fb/f51a03e232e00d6c504dfe815aed090c894ba3f8d3f7fd9612f3e227bf24/websocket_client-0.47.0-py2.py3-none-any.whl (200kB)\nCollecting docker-pycreds>=0.2.2 (from docker<4.0,>=3.2.1->docker-compose)\n  Downloading https://files.pythonhosted.org/packages/1c/8b/538e392ecd02aef761390fd30f057af73679839bd2096130689d73142aea/docker_pycreds-0.2.2-py2.py3-none-any.whl\nCollecting functools32; python_version == \"2.7\" (from jsonschema<3,>=2.5.1->docker-compose)\n  Downloading https://files.pythonhosted.org/packages/c5/60/6ac26ad05857c601308d8fb9e87fa36d0ebf889423f47c3502ef034365db/functools32-3.2.3-2.tar.gz\nCollecting urllib3<1.23,>=1.21.1 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Downloading https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl (132kB)\nCollecting idna<2.7,>=2.5 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)\nCollecting chardet<3.1.0,>=3.0.2 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)\nCollecting certifi>=2017.4.17 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)\nBuilding wheels for collected packages: backports.ssl-match-hostname, texttable, docopt, dockerpty, functools32\n  Running setup.py bdist_wheel for backports.ssl-match-hostname: started\n  Running setup.py bdist_wheel for backports.ssl-match-hostname: finished with status 'done'\n  Stored in directory: /root/.cache/pip/wheels/99/7e/f7/a88a9bcf7a3bd6b12cf6a74eee8c89746aaa02f71ab7b33939\n  Running setup.py bdist_wheel for texttable: started\n  Running setup.py bdist_wheel for texttable: finished with status 'done'\n  Stored in directory: /root/.cache/pip/wheels/99/1e/2b/8452d3a48dad98632787556a0f2f90d56703b39cdf7d142dd1\n  Running setup.py bdist_wheel for docopt: started\n  Running setup.py bdist_wheel for docopt: finished with status 'done'\n  Stored in directory: /root/.cache/pip/wheels/9b/04/dd/7daf4150b6d9b12949298737de9431a324d4b797ffd63f526e\n  Running setup.py bdist_wheel for dockerpty: started\n  Running setup.py bdist_wheel for dockerpty: finished with status 'done'\n  Stored in directory: /root/.cache/pip/wheels/e5/1e/86/bd0a97a0907c6c654af654d5875d1d4383dd1f575f77cee4aa\n  Running setup.py bdist_wheel for functools32: started\n  Running setup.py bdist_wheel for functools32: finished with status 'done'\n  Stored in directory: /root/.cache/pip/wheels/b5/18/32/77a1030457155606ba5e3ec3a8a57132b1a04b1c4f765177b2\nSuccessfully built backports.ssl-match-hostname texttable docopt dockerpty functools32\nInstalling collected packages: backports.ssl-match-hostname, websocket-client, urllib3, idna, chardet, certifi, requests, ipaddress, docker-pycreds, docker, functools32, jsonschema, cached-property, texttable, enum34, docopt, dockerpty, docker-compose\n  Found existing installation: urllib3 1.7.1\n\n:stderr: /usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  SNIMissingWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n  InsecurePlatformWarning\ncheetah 2.4.4 requires Markdown>=2.0.1, which is not installed.\nlaunchpadlib 1.10.2 requires testresources, which is not installed.\nCannot uninstall 'urllib3'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.\n"}

I'm having the same problem

Experiencing same issue

TASK [angstwad.docker_ubuntu : Install pip, setuptools, docker-py and docker-compose with pip] *********************************************************************************************************
ok: [test] => (item={u'version': u'latest', u'name': u'pip', u'install': True})
ok: [test] => (item={u'version': u'latest', u'name': u'setuptools', u'install': True})
skipping: [test] => (item={u'version': u'latest', u'name': u'docker', u'install': False})
failed: [test] (item={u'version': u'latest', u'name': u'docker-compose', u'install': True}) => {"changed": false, "cmd": "/usr/local/bin/pip install -U docker-compose", "failed": true, "item": {"install": true, "name": "docker-compose", "version": "latest"}, "msg": "stdout: Collecting docker-compose\n  Using cached https://files.pythonhosted.org/packages/26/d6/c2a33eb82f3bd59da803f812844e47211c353247f9dfb0938800b46af99d/docker_compose-1.21.0-py2.py3-none-any.whl\nRequirement not upgraded as not directly required: six<2,>=1.3.0 in /usr/lib/python2.7/dist-packages (from docker-compose) (1.5.2)\nCollecting docker<4.0,>=3.2.1 (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/31/01/41f727a549abd788eb91d0df4c801cb4c1f5227eee04a2621e13d7ed3e04/docker-3.3.0-py2.py3-none-any.whl\nCollecting jsonschema<3,>=2.5.1 (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/77/de/47e35a97b2b05c2fadbec67d44cfcdcd09b8086951b331d82de90d2912da/jsonschema-2.6.0-py2.py3-none-any.whl\nRequirement not upgraded as not directly required: backports.ssl-match-hostname>=3.5; python_version < \"3.5\" in /usr/local/lib/python2.7/dist-packages (from docker-compose) (3.5.0.1)\nCollecting cached-property<2,>=1.2.0 (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/ca/21/d793828ce0bb01baa6bed307c68466829343cc93fccc055cfbc21f774959/cached_property-1.4.2-py2.py3-none-any.whl\nCollecting ipaddress>=1.0.16; python_version < \"3.3\" (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl\nCollecting texttable<0.10,>=0.9.0 (from docker-compose)\nCollecting requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1 (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl\nCollecting enum34<2,>=1.0.4; python_version < \"3.4\" (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl\nCollecting docopt<0.7,>=0.6.1 (from docker-compose)\nCollecting dockerpty<0.5,>=0.4.1 (from docker-compose)\nRequirement not upgraded as not directly required: PyYAML<4,>=3.10 in /usr/lib/python2.7/dist-packages (from docker-compose) (3.10)\nRequirement not upgraded as not directly required: websocket-client<1.0,>=0.32.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose) (0.47.0)\nRequirement not upgraded as not directly required: docker-pycreds>=0.2.3 in /usr/local/lib/python2.7/dist-packages (from docker<4.0,>=3.2.1->docker-compose) (0.2.3)\nCollecting functools32; python_version == \"2.7\" (from jsonschema<3,>=2.5.1->docker-compose)\nCollecting urllib3<1.23,>=1.21.1 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl\nCollecting idna<2.7,>=2.5 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl\nCollecting chardet<3.1.0,>=3.0.2 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl\nCollecting certifi>=2017.4.17 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl\nInstalling collected packages: urllib3, idna, chardet, certifi, requests, ipaddress, docker, functools32, jsonschema, cached-property, texttable, enum34, docopt, dockerpty, docker-compose\n  Found existing installation: urllib3 1.7.1\n\n:stderr: cheetah 2.4.4 requires Markdown>=2.0.1, which is not installed.\nCannot uninstall 'urllib3'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.\n"}
pqr commented

Confirm failed following task on Ubuntu 14.04 (fresh Vagrant box ubuntu/trusty64)

TASK [angstwad.docker_ubuntu : Install pip, setuptools, docker-py and docker-compose with pip] ****************************************************************
ok: [vagrant_host] => (item={u'version': u'latest', u'name': u'pip', u'install': True})
ok: [vagrant_host] => (item={u'version': u'latest', u'name': u'setuptools', u'install': True})
skipping: [vagrant_host] => (item={u'version': u'latest', u'name': u'docker', u'install': False}) 
failed: [vagrant_host] (item={u'version': u'latest', u'name': u'docker-compose', u'install': True}) => {"changed": false, "cmd": "/usr/local/bin/pip install -U docker-compose", "item": {"install": true, "name": "docker-compose", "version": "latest"}, "msg": "stdout: Collecting docker-compose\n  Using cached https://files.pythonhosted.org/packages/2b/d3/65c7012b14463b4a36ea1db7fb6a9d4179c4573f6c0d12bcd2b07fbc54e0/docker_compose-1.21.1-py2.py3-none-any.whl\nRequirement not upgraded as not directly required: six<2,>=1.3.0 in /usr/lib/python2.7/dist-packages (from docker-compose) (1.5.2)\nRequirement not upgraded as not directly required: jsonschema<3,>=2.5.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose) (2.6.0)\nRequirement not upgraded as not directly required: backports.ssl-match-hostname>=3.5; python_version < \"3.5\" in /usr/local/lib/python2.7/dist-packages (from docker-compose) (3.5.0.1)\nRequirement not upgraded as not directly required: cached-property<2,>=1.2.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose) (1.4.2)\nRequirement not upgraded as not directly required: ipaddress>=1.0.16; python_version < \"3.3\" in /usr/local/lib/python2.7/dist-packages (from docker-compose) (1.0.22)\nRequirement not upgraded as not directly required: texttable<0.10,>=0.9.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose) (0.9.1)\nCollecting requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1 (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl\nCollecting enum34<2,>=1.0.4; python_version < \"3.4\" (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl\nCollecting docopt<0.7,>=0.6.1 (from docker-compose)\nCollecting docker<4.0,>=3.3.0 (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/31/01/41f727a549abd788eb91d0df4c801cb4c1f5227eee04a2621e13d7ed3e04/docker-3.3.0-py2.py3-none-any.whl\nCollecting dockerpty<0.5,>=0.4.1 (from docker-compose)\nRequirement not upgraded as not directly required: PyYAML<4,>=3.10 in /usr/lib/python2.7/dist-packages (from docker-compose) (3.10)\nCollecting websocket-client<1.0,>=0.32.0 (from docker-compose)\n  Using cached https://files.pythonhosted.org/packages/9d/fb/f51a03e232e00d6c504dfe815aed090c894ba3f8d3f7fd9612f3e227bf24/websocket_client-0.47.0-py2.py3-none-any.whl\nRequirement not upgraded as not directly required: functools32; python_version == \"2.7\" in /usr/local/lib/python2.7/dist-packages (from jsonschema<3,>=2.5.1->docker-compose) (3.2.3.post2)\nCollecting urllib3<1.23,>=1.21.1 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl\nCollecting idna<2.7,>=2.5 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl\nCollecting chardet<3.1.0,>=3.0.2 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl\nCollecting certifi>=2017.4.17 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl\nCollecting docker-pycreds>=0.2.3 (from docker<4.0,>=3.3.0->docker-compose)\n  Using cached https://files.pythonhosted.org/packages/5c/b6/3a4ca03225f6e9a25cb47cd3c695d19b88df5928ab9310e64dec1eb3b4d1/docker_pycreds-0.2.3-py2.py3-none-any.whl\nInstalling collected packages: urllib3, idna, chardet, certifi, requests, enum34, docopt, websocket-client, docker-pycreds, docker, dockerpty, docker-compose\n  Found existing installation: urllib3 1.7.1\n\n:stderr: cheetah 2.4.4 requires Markdown>=2.0.1, which is not installed.\nlaunchpadlib 1.10.2 requires testresources, which is not installed.\nCannot uninstall 'urllib3'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.\n"}

pretty-printed pip output:

stdout: Collecting docker-compose
  Using cached https://files.pythonhosted.org/packages/2b/d3/65c7012b14463b4a36ea1db7fb6a9d4179c4573f6c0d12bcd2b07fbc54e0/docker_compose-1.21.1-py2.py3-none-any.whl
Requirement not upgraded as not directly required: six<2,>=1.3.0 in /usr/lib/python2.7/dist-packages (from docker-compose) (1.5.2)
Requirement not upgraded as not directly required: jsonschema<3,>=2.5.1 in /usr/local/lib/python2.7/dist-packages (from docker-compose) (2.6.0)
Requirement not upgraded as not directly required: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from docker-compose) (3.5.0.1)
Requirement not upgraded as not directly required: cached-property<2,>=1.2.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose) (1.4.2)
Requirement not upgraded as not directly required: ipaddress>=1.0.16; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from docker-compose) (1.0.22)
Requirement not upgraded as not directly required: texttable<0.10,>=0.9.0 in /usr/local/lib/python2.7/dist-packages (from docker-compose) (0.9.1)
Collecting requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1 (from docker-compose)
  Using cached https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl
Collecting enum34<2,>=1.0.4; python_version < "3.4" (from docker-compose)
  Using cached https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Collecting docopt<0.7,>=0.6.1 (from docker-compose)
Collecting docker<4.0,>=3.3.0 (from docker-compose)
  Using cached https://files.pythonhosted.org/packages/31/01/41f727a549abd788eb91d0df4c801cb4c1f5227eee04a2621e13d7ed3e04/docker-3.3.0-py2.py3-none-any.whl
Collecting dockerpty<0.5,>=0.4.1 (from docker-compose)
Requirement not upgraded as not directly required: PyYAML<4,>=3.10 in /usr/lib/python2.7/dist-packages (from docker-compose) (3.10)
Collecting websocket-client<1.0,>=0.32.0 (from docker-compose)
  Using cached https://files.pythonhosted.org/packages/9d/fb/f51a03e232e00d6c504dfe815aed090c894ba3f8d3f7fd9612f3e227bf24/websocket_client-0.47.0-py2.py3-none-any.whl
Requirement not upgraded as not directly required: functools32; python_version == "2.7" in /usr/local/lib/python2.7/dist-packages (from jsonschema<3,>=2.5.1->docker-compose) (3.2.3.post2)
Collecting urllib3<1.23,>=1.21.1 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)
  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)
  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.19,>=2.6.1->docker-compose)
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Collecting docker-pycreds>=0.2.3 (from docker<4.0,>=3.3.0->docker-compose)
  Using cached https://files.pythonhosted.org/packages/5c/b6/3a4ca03225f6e9a25cb47cd3c695d19b88df5928ab9310e64dec1eb3b4d1/docker_pycreds-0.2.3-py2.py3-none-any.whl
Installing collected packages: urllib3, idna, chardet, certifi, requests, enum34, docopt, websocket-client, docker-pycreds, docker, dockerpty, docker-compose
  Found existing installation: urllib3 1.7.1

:stderr: cheetah 2.4.4 requires Markdown>=2.0.1, which is not installed.
launchpadlib 1.10.2 requires testresources, which is not installed.
Cannot uninstall 'urllib3'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Possibly related to docker/compose#3428? If so, the pip install should be fixed by adding --force and --upgrade flags to the install

This might be related to https://github.com/docker/compose/issues/3428#issuecomment-232272198

As a quick fix, forcefully downgrading pip might help. You may try to override pip version property to something like that: pip_version_pip: '9.0.3'.

pip_version_pip: '9.0.3' - This worked for me