{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1705","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1705/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1705/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1705/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/1705","id":94287362,"number":1705,"title":"Copy module copies files to '/' directory instead of specified destination","user":{"login":"drybjed","id":1043958,"avatar_url":"https://avatars.githubusercontent.com/u/1043958?v=3","gravatar_id":"","url":"https://api.github.com/users/drybjed","html_url":"https://github.com/drybjed","followers_url":"https://api.github.com/users/drybjed/followers","following_url":"https://api.github.com/users/drybjed/following{/other_user}","gists_url":"https://api.github.com/users/drybjed/gists{/gist_id}","starred_url":"https://api.github.com/users/drybjed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drybjed/subscriptions","organizations_url":"https://api.github.com/users/drybjed/orgs","repos_url":"https://api.github.com/users/drybjed/repos","events_url":"https://api.github.com/users/drybjed/events{/privacy}","received_events_url":"https://api.github.com/users/drybjed/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/P1","name":"P1","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/milestones/2","html_url":"https://github.com/ansible/ansible-modules-core/milestones/v2","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/milestones/2/labels","id":1031935,"number":2,"title":"v2","description":null,"creator":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":8,"state":"open","created_at":"2015-03-21T05:42:08Z","updated_at":"2015-08-07T21:06:34Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-07-10T11:16:12Z","updated_at":"2015-08-07T21:06:34Z","closed_at":"2015-08-07T21:06:34Z","body":"##### Issue Type:\r\n\r\nBug Report\r\n\r\n##### Ansible Version:\r\n\r\nCurrent Ansible devel / v2\r\n\r\n##### Ansible Configuration:\r\n\r\nAnsible installed using a `.deb` package created by `make deb` command.\r\n\r\n##### Environment:\r\n\r\nDebian, Ubuntu\r\n\r\n##### Summary:\r\n\r\n`copy` module, when used to copy contents of directories instead of single files, copies them to `/` directory instead of destination directory.\r\n\r\n##### Steps To Reproduce:\r\n\r\nExample playbook:\r\n```\r\n- hosts: all\r\n  sudo: True\r\n\r\n  tasks:\r\n    - copy:\r\n        src: 'files/'\r\n        dest: '/tmp/'\r\n```\r\nCreate a `files/` directory in your current directory with some example files. Create files with the same name as directories in `/`, for example `tmp` or `etc`.\r\n\r\n##### Expected Results:\r\n\r\nFiles are copied to specified directory without issues.\r\n\r\n##### Actual Results:\r\n\r\nFiles are copied to `/` directory. Example out of Ansible if a conflicting filename is used:\r\n```\r\nTASK [Copy files] ***************************************************************\r\nfatal: [hostname]: FAILED! => {\"msg\": \"attempted to take checksum of directory: /tmp\", \"failed\": true, \"changed\": false, \"invocation\": {\"module_name\": \"copy\", \"module_args\": {\"dest\": \"/tmp/\", \"src\": \"/var/local/drybjed/.ansible/tmp/ansible-tmp-1436526765.13-1117624961432/source\", \"original_basename\": \"/tmp\"}}, \"checksum\": \"972a1a11f19934401291cc99117ec614933374ce\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/128834242","html_url":"https://github.com/ansible/ansible-modules-core/issues/1705#issuecomment-128834242","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1705","id":128834242,"user":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T21:06:34Z","updated_at":"2015-08-07T21:06:34Z","body":"weeee! ... er I mean, closing since it works now."}}