{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/12503","labels_url":"https://api.github.com/repos/ansible/ansible/issues/12503/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/12503/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/12503/events","html_url":"https://github.com/ansible/ansible/issues/12503","id":108098964,"number":12503,"title":"support delegation to docker container","user":{"login":"ibotty","id":296430,"avatar_url":"https://avatars.githubusercontent.com/u/296430?v=3","gravatar_id":"","url":"https://api.github.com/users/ibotty","html_url":"https://github.com/ibotty","followers_url":"https://api.github.com/users/ibotty/followers","following_url":"https://api.github.com/users/ibotty/following{/other_user}","gists_url":"https://api.github.com/users/ibotty/gists{/gist_id}","starred_url":"https://api.github.com/users/ibotty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibotty/subscriptions","organizations_url":"https://api.github.com/users/ibotty/orgs","repos_url":"https://api.github.com/users/ibotty/repos","events_url":"https://api.github.com/users/ibotty/events{/privacy}","received_events_url":"https://api.github.com/users/ibotty/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-24T10:03:58Z","updated_at":"2015-09-24T15:41:06Z","closed_at":"2015-09-24T15:41:06Z","body":"It would greatly simplify playbooks if there were a way to delegate command to docker containers.\r\n\r\nE.g. the following task:\r\n```yaml\r\n- name: command within my/image\r\n  shell: \"docker run --rm my/image command\r\n```\r\n\r\nwould be\r\n```yaml\r\n- name: command within my/image\r\n  delegate_to_docker: my/image\r\n  shell: command\r\n```\r\n\r\nIt would be most useful to support running commands in both\r\n * existing running containers (`docker exec --name`),\r\n * and one-of containers (`docker run --rm`).\r\n\r\nIt should support the usual docker configuration (i.e. volumes, etc).\r\n\r\nI am thinking, it should use the container's python runtime (if there is any). So some containers might only be able to run raw commands.\r\n\r\nIf there is interest, I might implement that myself, please give me some guidance on where to start in that case."},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/142967328","html_url":"https://github.com/ansible/ansible/issues/12503#issuecomment-142967328","issue_url":"https://api.github.com/repos/ansible/ansible/issues/12503","id":142967328,"user":{"login":"jimi-c","id":26403,"avatar_url":"https://avatars.githubusercontent.com/u/26403?v=3","gravatar_id":"","url":"https://api.github.com/users/jimi-c","html_url":"https://github.com/jimi-c","followers_url":"https://api.github.com/users/jimi-c/followers","following_url":"https://api.github.com/users/jimi-c/following{/other_user}","gists_url":"https://api.github.com/users/jimi-c/gists{/gist_id}","starred_url":"https://api.github.com/users/jimi-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimi-c/subscriptions","organizations_url":"https://api.github.com/users/jimi-c/orgs","repos_url":"https://api.github.com/users/jimi-c/repos","events_url":"https://api.github.com/users/jimi-c/events{/privacy}","received_events_url":"https://api.github.com/users/jimi-c/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T15:41:06Z","updated_at":"2015-09-24T15:41:06Z","body":"Hi @ibotty, in general we do not add integrations this specific to Ansible language. Seeing as there are many ways to accomplish this, I don't believe we'd be interested in this feature.\r\n\r\nIf you'd like to continue discussing this, please direct questions/comments to one of the devel resources:\r\n\r\n   * https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code\r\n   * #ansible-devel on Freenode\r\n\r\nBecause this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.\r\n\r\nThank you!"}}