{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5435","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5435/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5435/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5435/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/5435","id":186171800,"number":5435,"title":"docker_service \"Failed to import docker-py\"","user":{"login":"d3v1an7","id":4087799,"avatar_url":"https://avatars.githubusercontent.com/u/4087799?v=3","gravatar_id":"","url":"https://api.github.com/users/d3v1an7","html_url":"https://github.com/d3v1an7","followers_url":"https://api.github.com/users/d3v1an7/followers","following_url":"https://api.github.com/users/d3v1an7/following{/other_user}","gists_url":"https://api.github.com/users/d3v1an7/gists{/gist_id}","starred_url":"https://api.github.com/users/d3v1an7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d3v1an7/subscriptions","organizations_url":"https://api.github.com/users/d3v1an7/orgs","repos_url":"https://api.github.com/users/d3v1an7/repos","events_url":"https://api.github.com/users/d3v1an7/events{/privacy}","received_events_url":"https://api.github.com/users/d3v1an7/received_events","type":"User","site_admin":false},"labels":[{"id":454885373,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/affects_2.3","name":"affects_2.3","color":"5319e7","default":false},{"id":132571937,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":132897218,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":397590879,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/docker","name":"docker","color":"e99695","default":false},{"id":414073372,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/waiting_on_maintainer","name":"waiting_on_maintainer","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-30T23:00:20Z","updated_at":"2016-11-16T03:32:20Z","closed_at":null,"body":"##### ISSUE TYPE\r\n- Bug Report\r\n\r\n##### COMPONENT NAME\r\n\r\ndocker_service\r\n\r\n##### ANSIBLE VERSION\r\n\r\n```\r\nansible 2.3.0\r\n  config file =\r\n  configured module search path = Default w/o overrides\r\n```\r\n##### CONFIGURATION\r\n\r\nNo custom config\r\n##### OS / ENVIRONMENT\r\n\r\nOS X 10.11.6\r\n##### SUMMARY\r\n\r\nAnsible unable to locate docker-py, even though it's installed (see version output below).\r\n\r\n**Versions:**\r\n\r\n```\r\n$ pip show docker-py\r\n\n---\r\nMetadata-Version: 2.0\r\nName: docker-py\r\nVersion: 1.10.5\r\nSummary: Python client for Docker.\r\nHome-page: https://github.com/docker/docker-py/\r\nAuthor: Joffrey F\r\nAuthor-email: joffrey@docker.com\r\nInstaller: pip\r\nLicense: UNKNOWN\r\nLocation: /usr/local/lib/python2.7/site-packages\r\nRequires: six, backports.ssl-match-hostname, ipaddress, websocket-client, docker-pycreds, requests\r\nClassifiers:\r\n  Development Status :: 4 - Beta\r\n  Environment :: Other Environment\r\n  Intended Audience :: Developers\r\n  Operating System :: OS Independent\r\n  Programming Language :: Python\r\n  Programming Language :: Python :: 2\r\n  Programming Language :: Python :: 2.6\r\n  Programming Language :: Python :: 2.7\r\n  Programming Language :: Python :: 3\r\n  Programming Language :: Python :: 3.3\r\n  Programming Language :: Python :: 3.4\r\n  Programming Language :: Python :: 3.5\r\n  Topic :: Utilities\r\n  License :: OSI Approved :: Apache Software License\r\n```\r\n\r\n```\r\n$ docker version\r\nClient:\r\n Version:      1.12.1\r\n API version:  1.24\r\n Go version:   go1.7.1\r\n Git commit:   6f9534c\r\n Built:        Thu Sep  8 10:31:18 2016\r\n OS/Arch:      darwin/amd64\r\n\r\nServer:\r\n Version:      1.12.1\r\n API version:  1.24\r\n Go version:   go1.6.3\r\n Git commit:   23cf638\r\n Built:        Thu Aug 18 17:52:38 2016\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\n```\r\n$ docker-compose --version\r\ndocker-compose version 1.8.0, build f3628c7\r\n```\r\n##### STEPS TO REPRODUCE\r\n\r\nSee example playbook:\r\n\r\n```\r\n\n---\r\n- name: test docker service\r\n  docker_service:\r\n    project_src: \"{{ lookup('env', 'HOME') }}/docker-compose-yaml-file-in-this-dir\"\r\n```\r\n##### EXPECTED RESULTS\r\n\r\ndocker_service to read/execute docker-compose.yaml file successfully\r\n##### ACTUAL RESULTS\r\n\r\nansible exits after task fails\r\n\r\n```\r\nfatal: [localhost]: FAILED! => {\r\n    \"changed\": false,\r\n    \"failed\": true,\r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"api_version\": null,\r\n            \"build\": false,\r\n            \"cacert_path\": null,\r\n            \"cert_path\": null,\r\n            \"debug\": false,\r\n            \"definition\": null,\r\n            \"dependencies\": true,\r\n            \"docker_host\": null,\r\n            \"files\": null,\r\n            \"filter_logger\": false,\r\n            \"hostname_check\": false,\r\n            \"key_path\": null,\r\n            \"nocache\": false,\r\n            \"project_name\": null,\r\n            \"project_src\": \"/Users/hahaha/docker-compose-yaml-file-in-this-dir\",\r\n            \"pull\": false,\r\n            \"recreate\": \"smart\",\r\n            \"remove_images\": null,\r\n            \"remove_orphans\": false,\r\n            \"remove_volumes\": false,\r\n            \"restarted\": false,\r\n            \"scale\": null,\r\n            \"services\": null,\r\n            \"ssl_version\": null,\r\n            \"state\": \"present\",\r\n            \"stopped\": false,\r\n            \"timeout\": 10,\r\n            \"tls\": null,\r\n            \"tls_hostname\": null,\r\n            \"tls_verify\": null\r\n        },\r\n        \"module_name\": \"docker_service\"\r\n    },\r\n    \"msg\": \"Failed to import docker-py - No module named requests.exceptions. Try `pip install docker-py`\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/260844318","html_url":"https://github.com/ansible/ansible-modules-core/issues/5435#issuecomment-260844318","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/5435","id":260844318,"user":{"login":"jctanner","id":1869705,"avatar_url":"https://avatars.githubusercontent.com/u/1869705?v=3","gravatar_id":"","url":"https://api.github.com/users/jctanner","html_url":"https://github.com/jctanner","followers_url":"https://api.github.com/users/jctanner/followers","following_url":"https://api.github.com/users/jctanner/following{/other_user}","gists_url":"https://api.github.com/users/jctanner/gists{/gist_id}","starred_url":"https://api.github.com/users/jctanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jctanner/subscriptions","organizations_url":"https://api.github.com/users/jctanner/orgs","repos_url":"https://api.github.com/users/jctanner/repos","events_url":"https://api.github.com/users/jctanner/events{/privacy}","received_events_url":"https://api.github.com/users/jctanner/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T03:32:20Z","updated_at":"2016-11-16T03:32:20Z","body":"I just ran into a similar issue:\r\n```\r\n\"msg\": \"Failed to import docker-py - cannot import name InvalidHeader. Try `pip install docker-py`\"\r\n```\r\n\r\nPlease clean out all copies of the requests library, reinstall it and then re-test ansible.\r\n\r\nneeds_info"}}
{"actor":{"display_login":"jctanner"}}