{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2269","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2269/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2269/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2269/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/2269","id":111335399,"number":2269,"title":"ansible is failing to pull docker containe","user":{"login":"rrohana","id":13851956,"avatar_url":"https://avatars.githubusercontent.com/u/13851956?v=3","gravatar_id":"","url":"https://api.github.com/users/rrohana","html_url":"https://github.com/rrohana","followers_url":"https://api.github.com/users/rrohana/followers","following_url":"https://api.github.com/users/rrohana/following{/other_user}","gists_url":"https://api.github.com/users/rrohana/gists{/gist_id}","starred_url":"https://api.github.com/users/rrohana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrohana/subscriptions","organizations_url":"https://api.github.com/users/rrohana/orgs","repos_url":"https://api.github.com/users/rrohana/repos","events_url":"https://api.github.com/users/rrohana/events{/privacy}","received_events_url":"https://api.github.com/users/rrohana/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/cloud","name":"cloud","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-14T06:47:14Z","updated_at":"2016-04-11T13:41:06Z","closed_at":null,"body":"HI \r\nI have a problem pulling docker image from private repo using docker-py module \r\n```  \r\nname:  start our container  \r\ndocker:\r\n    image: augury/backend:{{ FILE_SERVER.TAG }}\r\n    name: file_server\r\n    registry: \"{{ registry_host }}\"\r\n    username: \"{{ registry_user }}\"\r\n    email: \"{{ registry_mail }}\"\r\n    password: \"{{ registry_pass }}\"\r\n    pull: always\r\n    publish_all_ports: yes\r\n    state: reloaded\r\n    restart_policy: always\r\n```\r\nI get an error :\r\n```\r\n  ailed: [52.91.208.50] => {\"failed\": true, \"parsed\": false}\r\nsudo: unable to resolve host ip-172-40-0-148\r\nsudo: unable to resolve host ip-172-40-0-148\r\nBECOME-SUCCESS-quuevnpngrybsandhoeqbaezoplwauzd\r\nTraceback (most recent call last):\r\n  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1444804654.54-79661512810617/docker\", line 3185, in <module>\r\n    main()\r\n  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1444804654.54-79661512810617/docker\", line 1542, in main\r\n    reloaded(manager, containers, count, name)\r\n  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1444804654.54-79661512810617/docker\", line 1419, in reloaded\r\n    for container in manager.get_differing_containers():\r\n  File \"/home/ubuntu/.ansible/tmp/ansible-tmp-1444804654.54-79661512810617/docker\", line 933, in get_differing_containers\r\n    expected_exposed_ports = set((image['ContainerConfig']['ExposedPorts'] or {}).keys())\r\nKeyError: 'ExposedPorts'\r\nOpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: mux_client_request_session: master session id: 2\r\nShared connection to 52.91.208.50 closed.\r\n```\r\nI saw this ticket https://github.com/ansible/ansible-modules-core/issues/940\r\nBut what I get is different error. \r\nI use docker-py 1.2.3  and I get same error with higher versions { 1.3, 1.4, 1.5}\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/208350003","html_url":"https://github.com/ansible/ansible-modules-core/issues/2269#issuecomment-208350003","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2269","id":208350003,"user":{"login":"Rauwekost","id":3327058,"avatar_url":"https://avatars.githubusercontent.com/u/3327058?v=3","gravatar_id":"","url":"https://api.github.com/users/Rauwekost","html_url":"https://github.com/Rauwekost","followers_url":"https://api.github.com/users/Rauwekost/followers","following_url":"https://api.github.com/users/Rauwekost/following{/other_user}","gists_url":"https://api.github.com/users/Rauwekost/gists{/gist_id}","starred_url":"https://api.github.com/users/Rauwekost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rauwekost/subscriptions","organizations_url":"https://api.github.com/users/Rauwekost/orgs","repos_url":"https://api.github.com/users/Rauwekost/repos","events_url":"https://api.github.com/users/Rauwekost/events{/privacy}","received_events_url":"https://api.github.com/users/Rauwekost/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T13:41:06Z","updated_at":"2016-04-11T13:41:06Z","body":"Im having a similar problem when using the docker-reloaded state with a playbook:\r\n\r\n```\r\n- name: Run docker registry\r\n    docker:\r\n      image: \"registry:2\"\r\n      name: registry\r\n      ports:\r\n        - \"127.0.0.1:5000:5000\"\r\n      privileged: yes\r\n      state: reloaded\r\n      pull: missing\r\n```\r\n\r\n```\r\n{\r\n    \"changed\": false,\r\n    \"failed\": true,\r\n    \"module_stderr\": \"\",\r\n    \"module_stdout\": \"Traceback (most recent call last):\\r\\n  File \\\"/home/ubuntu/.ansible/tmp/ansible-tmp-1460381645.56-214234813111408/docker\\\", line 3728, in <module>\\r\\n    main()\\r\\n  File \\\"/home/ubuntu/.ansible/tmp/ansible-tmp-1460381645.56-214234813111408/docker\\\", line 1740, in main\\r\\n    reloaded(manager, containers, count, name)\\r\\n  File \\\"/home/ubuntu/.ansible/tmp/ansible-tmp-1460381645.56-214234813111408/docker\\\", line 1599, in reloaded\\r\\n    for container in manager.get_differing_containers():\\r\\n  File \\\"/home/ubuntu/.ansible/tmp/ansible-tmp-1460381645.56-214234813111408/docker\\\", line 1136, in get_differing_containers\\r\\n    name, value = container_env.split('=', 1)\\r\\nValueError: need more than 1 value to unpack\\r\\n\",\r\n    \"msg\": \"MODULE FAILURE\",\r\n    \"parsed\": false\r\n}\r\n```"}}