{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/10002","labels_url":"https://api.github.com/repos/ansible/ansible/issues/10002/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/10002/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/10002/events","html_url":"https://github.com/ansible/ansible/issues/10002","id":54288376,"number":10002,"title":"copy modules fails if lookup() files are reference in group_vars","user":{"login":"tgolly","id":6334782,"avatar_url":"https://avatars.githubusercontent.com/u/6334782?v=3","gravatar_id":"","url":"https://api.github.com/users/tgolly","html_url":"https://github.com/tgolly","followers_url":"https://api.github.com/users/tgolly/followers","following_url":"https://api.github.com/users/tgolly/following{/other_user}","gists_url":"https://api.github.com/users/tgolly/gists{/gist_id}","starred_url":"https://api.github.com/users/tgolly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgolly/subscriptions","organizations_url":"https://api.github.com/users/tgolly/orgs","repos_url":"https://api.github.com/users/tgolly/repos","events_url":"https://api.github.com/users/tgolly/events{/privacy}","received_events_url":"https://api.github.com/users/tgolly/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P2","name":"P2","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-14T06:20:55Z","updated_at":"2015-01-19T15:01:20Z","closed_at":"2015-01-19T15:01:20Z","body":"##### Issue Type: Bug Report\r\n\r\n##### Ansible Version:  1.8.2\r\n\r\n##### Environment:  RHEL 6.5\r\n\r\n#####  Summary:\r\n\r\nFor some reason the \"copy\" module bombs out if lookup('file', '...') is referenced in group_vars, even though the \"copy\" task itself does not reference that variable, and the file does exist relative to the role directory.\r\n\r\n##### Steps to reproduce:\r\n\r\nPlease see this gist:  https://gist.github.com/tgolly/930dce54307139f9c758\r\n\r\nYou'll see that \"authorized_key\" tasks successfully references the \"listofkeys\" variable and deploys the file, then the \"file\" and \"stat\" tasks both work without error, then \"copy\" bombs out, even though it doesn't reference the \"listofkeys\" variable from group_vars/all.\r\n\r\n##### Expected Results:  \r\n\r\nThe file is copied without error.\r\n\r\n##### Actual Results:  \r\n\r\n    TASK: [myrole | copy src=/etc/hosts dest=/tmp/foo] ****************************\r\n    fatal: [localhost] => could not locate file in lookup: public_keys/somekey\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/70506717","html_url":"https://github.com/ansible/ansible/issues/10002#issuecomment-70506717","issue_url":"https://api.github.com/repos/ansible/ansible/issues/10002","id":70506717,"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-01-19T15:01:20Z","updated_at":"2015-01-19T15:01:20Z","body":"duplicate of #9944"}}