{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/21735","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/21735/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/21735/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/21735/events","html_url":"https://github.com/ansible/ansible/issues/21735","id":209261294,"number":21735,"title":"Roles cannot find resources within their own role","user":{"login":"wltjr","id":12835340,"avatar_url":"https://avatars.githubusercontent.com/u/12835340?v=3","gravatar_id":"","url":"https://api.github.com/users/wltjr","html_url":"https://github.com/wltjr","followers_url":"https://api.github.com/users/wltjr/followers","following_url":"https://api.github.com/users/wltjr/following{/other_user}","gists_url":"https://api.github.com/users/wltjr/gists{/gist_id}","starred_url":"https://api.github.com/users/wltjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wltjr/subscriptions","organizations_url":"https://api.github.com/users/wltjr/orgs","repos_url":"https://api.github.com/users/wltjr/repos","events_url":"https://api.github.com/users/wltjr/events{/privacy}","received_events_url":"https://api.github.com/users/wltjr/received_events","type":"User","site_admin":false},"labels":[{"id":437720699,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.2","name":"affects_2.2","color":"5319e7","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":54811101,"url":"https://api.github.com/repos/ansible/ansible/labels/needs_info","name":"needs_info","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-02-21T20:20:30Z","updated_at":"2017-02-27T21:47:47Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nTemplate module, but I think this is a core issue effecting all\r\n\r\n##### ANSIBLE VERSION\r\nDoes not work\r\nansible 2.2.1.0\r\n  config file = /sites/site1/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n\r\nansible 2.3.0\r\n  config file = /sites/site1/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n\r\nWorks in \r\nansible 2.1.4.0\r\n  config file = /sites/site1/ansible/ansible.cfg\r\n  configured module search path = Default w/o override\r\n\r\n##### CONFIGURATION\r\n```\r\n$ cat ansible.cfg \r\n[defaults]\r\ninventory=hosts\r\npipelining=True\r\nremote_user=ro\r\n```\r\n##### OS / ENVIRONMENT\r\nGentoo\r\n\r\n##### SUMMARY\r\nRoles cannot find files/templates in the roles own directories\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\nSame with ansible 2.2.1.0 and 2.3.0, works with 2.1.4.0\r\n\r\nmkdir -p roles/test/tasks roles/test/templates\r\n\r\n$ cat test.yaml \r\n```yaml\r\n---\r\n- name: Test the test role\r\n  hosts: ws\r\n  roles:\r\n   - test\r\n```\r\n\r\n$ cat roles/test/tasks/main.yaml \r\n```yaml\r\n- name: Install test template from role\r\n  template:\r\n    src: templates/empty.j2\r\n    dest: /tmp/empty.j2\r\n```\r\n\r\n$ cat roles/test/templates/empty.j2\r\n\r\n##### EXPECTED RESULTS\r\n## Versions 2.1.4.0 ##\r\n\r\n$ ansible-playbook test.yaml \r\n\r\nPLAY [Test the test role] ******************************************************\r\n\r\nTASK [setup] *******************************************************************\r\nok: [ws]\r\n\r\nTASK [test : Install test template from role] **********************************\r\nchanged: [ws]\r\n\r\nPLAY RECAP *********************************************************************\r\nws                         : ok=2    changed=1    unreachable=0    failed=0   \r\n\r\n##### ACTUAL RESULTS\r\n## Versions 2.2.1.0 and 2.3.0 ##\r\n\r\n$ ansible-playbook test.yaml \r\n\r\nPLAY [Test the test role] ******************************************************\r\n\r\nTASK [Gathering Facts] *********************************************************\r\nok: [ws]\r\n\r\nTASK [test : Install test template from role] **********************************\r\nfatal: [ws]: FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"Unable to find 'templates/empty.j2' in expected paths.\"}\r\n        to retry, use: --limit @/sites/site1/ansible/test.retry\r\n\r\nPLAY RECAP *********************************************************************\r\nws                         : ok=1    changed=0    unreachable=0    failed=1\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/282865477","html_url":"https://github.com/ansible/ansible/issues/21735#issuecomment-282865477","issue_url":"https://api.github.com/repos/ansible/ansible/issues/21735","id":282865477,"user":{"login":"wltjr","id":12835340,"avatar_url":"https://avatars.githubusercontent.com/u/12835340?v=3","gravatar_id":"","url":"https://api.github.com/users/wltjr","html_url":"https://github.com/wltjr","followers_url":"https://api.github.com/users/wltjr/followers","following_url":"https://api.github.com/users/wltjr/following{/other_user}","gists_url":"https://api.github.com/users/wltjr/gists{/gist_id}","starred_url":"https://api.github.com/users/wltjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wltjr/subscriptions","organizations_url":"https://api.github.com/users/wltjr/orgs","repos_url":"https://api.github.com/users/wltjr/repos","events_url":"https://api.github.com/users/wltjr/events{/privacy}","received_events_url":"https://api.github.com/users/wltjr/received_events","type":"User","site_admin":false},"created_at":"2017-02-27T21:47:47Z","updated_at":"2017-02-27T21:47:47Z","body":"Install only one of the following, first builds, 2nd uses pre-built binary, 3rd pulls in specific pre-built binary version.\r\n```\r\nemerge  -qv ansible\r\nemerge -qkv ansible\r\nemerge -qkv =ansible-2.1.4.0\r\n```\r\nI may need to rebuild as I do make binaries and install those since I am running multiple systems. Thought I doubt rebuilding will have any effect, not like this is a binary package really, no compiling, linking. Any python libraries will be same between versions of ansible.\r\n\r\nInventory is pretty basic, but I thought maybe a system or group name may conflict with role. But I have no tests systems or groups. I ruled that out with dns creating a bind role/symlink, and other tests.\r\n\r\nInventory is pretty basic. In this example ws is a workstation/desktop. Just a entry in host, and it has a var file for IP address and other host specific stuff. Pretty basic stuff. I have more complex hosts but in same format. Nothing that should effect role paths.\r\n\r\nhosts.yaml\r\n```yaml\r\n[lan]\r\ndev\r\nws\r\nwlt\r\n```\r\n\r\nhost_vars/ws\r\n```\r\n---\r\nhostname: ws\r\nipv4: 0.0.0.0\r\nipv6: \"::\"\r\nlan: \r\nula: \r\nzone: New_York\r\nprofile: default/linux/amd64/13.0/desktop/plasma\r\n```\r\n\r\n"}}
{"actor":{"display_login":"wltjr"}}