{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/12524","labels_url":"https://api.github.com/repos/ansible/ansible/issues/12524/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/12524/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/12524/events","html_url":"https://github.com/ansible/ansible/issues/12524","id":108346047,"number":12524,"title":"Relative paths don't work correctly when running multiple playbooks from one playbook","user":{"login":"geerlingguy","id":481677,"avatar_url":"https://avatars.githubusercontent.com/u/481677?v=3","gravatar_id":"","url":"https://api.github.com/users/geerlingguy","html_url":"https://github.com/geerlingguy","followers_url":"https://api.github.com/users/geerlingguy/followers","following_url":"https://api.github.com/users/geerlingguy/following{/other_user}","gists_url":"https://api.github.com/users/geerlingguy/gists{/gist_id}","starred_url":"https://api.github.com/users/geerlingguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geerlingguy/subscriptions","organizations_url":"https://api.github.com/users/geerlingguy/orgs","repos_url":"https://api.github.com/users/geerlingguy/repos","events_url":"https://api.github.com/users/geerlingguy/events{/privacy}","received_events_url":"https://api.github.com/users/geerlingguy/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":{"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},"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/5","html_url":"https://github.com/ansible/ansible/milestones/v2","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/5/labels","id":975800,"number":5,"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":17,"closed_issues":407,"state":"open","created_at":"2015-02-11T19:43:06Z","updated_at":"2015-10-17T16:45:27Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-09-25T15:18:29Z","updated_at":"2015-10-17T16:45:27Z","closed_at":"2015-10-17T16:45:27Z","body":"##### Issue Type:\r\n\r\n  - Bug Report\r\n\r\n##### Ansible Version:\r\n\r\nansible 2.0.0 (devel 41756be4d3) last updated 2015/09/25 10:05:38 (GMT -500)\r\n\r\n##### Ansible Configuration:\r\n\r\nNo changes from defaults.\r\n\r\n##### Environment:\r\n\r\nMac OS X 10.10.4\r\n\r\n##### Summary:\r\n\r\nI have a setup where I have one playbook that includes other playbooks.\r\n\r\nIf I run `ansible-playbook` with the parent playbook, which includes other playbooks, the relative pathing for tasks _inside_ the other playbooks seems to get stuck or messed up.\r\n\r\nIf I run `ansible-playbook` with the child playbooks directly (one-by-one), relative pathing works as expected.\r\n\r\n##### Steps To Reproduce:\r\n\r\nThis can be reproduced using the example LAMP infrastructure example found here, in the Ansible for DevOps book repository: https://github.com/geerlingguy/ansible-for-devops/tree/master/lamp-infrastructure\r\n\r\nI have a directory layout like this:\r\n\r\n```\r\nlamp-infrastructure/\r\n  playbooks/\r\n    memcached/\r\n      main.yml\r\n    varnish/\r\n      templates/\r\n        default.vcl.j2\r\n      main.yml\r\n  configure.yml\r\n```\r\n\r\nInside `configure.yml` (a 'master' playbook which simply includes the two children playbooks):\r\n\r\n```yaml\r\n---\r\n- include: playbooks/varnish/main.yml\r\n- include: playbooks/memcached/main.yml\r\n```\r\n\r\nIf I run the varnish or memcached `main.yml` playbooks directly, everything works fine:\r\n\r\n```\r\nansible-playbook -i inventories/vagrant/inventory playbooks/varnish/main.yml -u vagrant --ask-pass\r\n...\r\nTASK [Copy Varnish default.vcl.] ***********************************************\r\nchanged: [192.168.2.2]\r\n...\r\nPLAY RECAP *********************************************************************\r\n192.168.2.2                : ok=18   changed=3    unreachable=0    failed=0 \r\n```\r\n\r\nHowever, if I run the `configure.yml` playbook that includes the two main.yml playbooks, it seems Ansible mixes up the paths for tasks like `copy`.\r\n\r\n```\r\nansible-playbook -i inventories/vagrant/inventory configure.yml -u vagrant --ask-pass\r\n...\r\nTASK [Copy Varnish default.vcl.] ***********************************************\r\nfatal: [192.168.2.2]: FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"IOError: [Errno 2] No such file or directory: u'/Users/jgeerling/Dropbox/Development/GitHub/ansible-for-devops/lamp-infrastructure/playbooks/memcached/templates/default.vcl.j2'\"}\r\nUnexpected Exception: 'unicode' object has no attribute 'name'\r\n```\r\n\r\nEverything works fine in Ansible <= 1.9.3, but fails in Ansible 2.0.0.\r\n\r\n##### Expected Results:\r\n\r\nPlaybook completes successfully whether run standalone or as part of the master `configure.yml` playbook.\r\n\r\n##### Actual Results:\r\n\r\nPlaybook completes successfully when run standalone.\r\n\r\nPlaybook results in relative pathing error when run as part of the master `configure.yml` playbook:\r\n\r\n```\r\nTASK [Copy Varnish default.vcl.] ***********************************************\r\nfatal: [192.168.2.2]: FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"IOError: [Errno 2] No such file or directory: u'/Users/jgeerling/Dropbox/Development/GitHub/ansible-for-devops/lamp-infrastructure/playbooks/memcached/templates/default.vcl.j2'\"}\r\nUnexpected Exception: 'unicode' object has no attribute 'name'\r\n```"}}