{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1896","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1896/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1896/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1896/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/1896","id":100132582,"number":1896,"title":"Docker module fails to create containers with docker 1.7.1 (cannot unmarshal string)","user":{"login":"WishCow","id":969284,"avatar_url":"https://avatars.githubusercontent.com/u/969284?v=3","gravatar_id":"","url":"https://api.github.com/users/WishCow","html_url":"https://github.com/WishCow","followers_url":"https://api.github.com/users/WishCow/followers","following_url":"https://api.github.com/users/WishCow/following{/other_user}","gists_url":"https://api.github.com/users/WishCow/gists{/gist_id}","starred_url":"https://api.github.com/users/WishCow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WishCow/subscriptions","organizations_url":"https://api.github.com/users/WishCow/orgs","repos_url":"https://api.github.com/users/WishCow/repos","events_url":"https://api.github.com/users/WishCow/events{/privacy}","received_events_url":"https://api.github.com/users/WishCow/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"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-10T18:07:23Z","updated_at":"2015-12-02T20:20:34Z","closed_at":null,"body":"Running ansible 1.9.2 on Arch, trying to create a container with:\r\n```\r\n- name: Ensure the docker container is present\r\n  docker:\r\n    email: \"{{ syncthing_registry.email }}\"\r\n    password: \"{{ syncthing_registry.password }}\"\r\n    pull: always\r\n    name: \"{{ syncthing_container_name }}\"\r\n    image: \"{{ syncthing_image_name }}\"\r\n    state: reloaded\r\n    command: syncthing\r\n    volumes: \"{{ [ syncthing_outer_config ~ ':' ~ syncthing_inner_config ] | union(syncthing_mounts) }}\"\r\n    ports: \"{{ syncthing_port_mappings }}\"\r\n    restart_policy: always\r\n    dns: 8.8.8.8\r\n```\r\n\r\nUsing docker 1.7.1, this results in:\r\n\r\n```\r\nTASK: [syncthing | Ensure the docker container is present] ******************** \r\nfailed: [myhost] => {\"changed\": true, \"failed\": true}\r\nmsg: Docker API Error: json: cannot unmarshal string into Go value of type []string\r\n```\r\n\r\nLooking at the logs of the docker daemon with `systemctl status docker` shows:\r\n```\r\nAug 10 19:59:26 myhost docker[24054]: time=\"2015-08-10T19:59:26.179563155+02:00\" level=info msg=\"POST /v1.17/containers/b3f6bc24865825c7c9a42a193a88a361a55a417910c78321fa49cc4074dd734a/start\"\r\nAug 10 19:59:26 myhost docker[24054]: time=\"2015-08-10T19:59:26.179650069+02:00\" level=error msg=\"Handler for POST /containers/{name:.*}/start returned error: json: cannot unmarshal string into Go value of type []string\"\r\nAug 10 19:59:26 myhost docker[24054]: time=\"2015-08-10T19:59:26.179676277+02:00\" level=error msg=\"HTTP Error\" err=\"json: cannot unmarshal string into Go value of type []string\" statusCode=500\r\n```\r\n\r\nDowngrading docker to 1.6.2 fixes the issue."},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/161421839","html_url":"https://github.com/ansible/ansible-modules-core/issues/1896#issuecomment-161421839","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1896","id":161421839,"user":{"login":"WishCow","id":969284,"avatar_url":"https://avatars.githubusercontent.com/u/969284?v=3","gravatar_id":"","url":"https://api.github.com/users/WishCow","html_url":"https://github.com/WishCow","followers_url":"https://api.github.com/users/WishCow/followers","following_url":"https://api.github.com/users/WishCow/following{/other_user}","gists_url":"https://api.github.com/users/WishCow/gists{/gist_id}","starred_url":"https://api.github.com/users/WishCow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WishCow/subscriptions","organizations_url":"https://api.github.com/users/WishCow/orgs","repos_url":"https://api.github.com/users/WishCow/repos","events_url":"https://api.github.com/users/WishCow/events{/privacy}","received_events_url":"https://api.github.com/users/WishCow/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T20:20:34Z","updated_at":"2015-12-02T20:20:34Z","body":"I can confirm that @olvesh's workaround of putting the dns entries as an array, instead of a string works."}}