{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/42585","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/42585/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/42585/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/42585/events","html_url":"https://github.com/ansible/ansible/issues/42585","id":339895456,"node_id":"MDU6SXNzdWUzMzk4OTU0NTY=","number":42585,"title":"word \"tasks\" in role path causes template search problem","user":{"login":"novmar","id":26750149,"node_id":"MDQ6VXNlcjI2NzUwMTQ5","avatar_url":"https://avatars1.githubusercontent.com/u/26750149?v=4","gravatar_id":"","url":"https://api.github.com/users/novmar","html_url":"https://github.com/novmar","followers_url":"https://api.github.com/users/novmar/followers","following_url":"https://api.github.com/users/novmar/following{/other_user}","gists_url":"https://api.github.com/users/novmar/gists{/gist_id}","starred_url":"https://api.github.com/users/novmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novmar/subscriptions","organizations_url":"https://api.github.com/users/novmar/orgs","repos_url":"https://api.github.com/users/novmar/repos","events_url":"https://api.github.com/users/novmar/events{/privacy}","received_events_url":"https://api.github.com/users/novmar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-10T15:30:52Z","updated_at":"2018-07-10T15:35:29Z","closed_at":null,"author_association":"NONE","body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nTHIS FORM WILL BE READ BY A MACHINE, COMPLETE ALL SECTIONS AS DESCRIBED.\r\nAlso test if the latest release, and devel branch are affected too.\r\nALWAYS add information AFTER (OUTSIDE) these html comments.\r\nOtherwise it may end up being automatically closed by our bot. -->\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nrole in directory ending wiht \"tasks\"  cause  template search problem\r\ne.g. when i place  my role in dircotry containing tasks ( roles/sometasks/somerole)  then searching for templates is messed up.\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Insert, BELOW THIS COMMENT, the name of the module, plugin, task or feature.\r\nDo not include extra details here, e.g. \"vyos_command\" not \"the network module vyos_command\" or the full path-->\r\n\r\ntemplate, roles\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste, BELOW THIS COMMENT, verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.6.1\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = ['/home/novotny/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python3.6/site-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 3.6.6 (default, Jun 27 2018, 13:11:40) [GCC 8.1.1 20180531]\r\n```\r\n##### CONFIGURATION\r\n<!--- If using Ansible 2.4 or above, paste, BELOW THIS COMMENT, the results of \"ansible-config dump --only-changed\"\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).-->\r\n\r\n##### OS / ENVIRONMENT\r\n<!--- Mention, BELOW THIS COMMENT, the OS you are running Ansible from, and the OS you are\r\nmanaging, or say \"N/A\" for anything that is not platform-specific.\r\nAlso mention the specific version of what you are trying to control,\r\ne.g. if this is a network bug the version of firmware on the network device.-->\r\n\r\narchlinux,\r\nLinux 4.17.4-1-zen #1 ZEN SMP PREEMPT Tue Jul 3 15:45:59 UTC 2018 x86_64 GNU/Linux\r\n\r\n\r\n##### STEPS TO REPRODUCE\r\n<!--- For bugs, show exactly how to reproduce the problem, using a minimal test-case.\r\nFor new features, show how the feature would be used. -->\r\ni made setup in my gitlab:\r\n```\r\ngit clone https://github.com/novmar/ansible_error.git\r\ncd ansible_error/\r\nansible-playbook bad.yml \r\n```\r\nproblem is, when i call my role from directory ends with \"tasks\".\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\nbest way is to remove template \"test\" from my ansible playbook, and then run, and see, where is ansible  looking for \"test\" file.\r\n```\r\ngit clone https://github.com/novmar/ansible_error.git\r\ncd ansible_error/\r\nrm roles/good/a/templates/test \r\nrm roles/basictasks/a/templates/test \r\nANSIBLE_STDOUT_CALLBACK=debug ansible-playbook bad.yml \r\n```\r\n\r\n\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\n```\r\nTASK [basictasks/a : test error basictask] ****************************************************************************************************************************\r\nfatal: [localhost]: FAILED! => {\r\n    \"changed\": false\r\n}\r\n\r\nMSG:\r\n\r\nCould not find or access 'test'\r\nSearched in:\r\n\t/tmp/ansible_error/roles/basictasks/a/templates/test\r\n\t/tmp/ansible_error/roles/basictasks/a/test\r\n\t/tmp/ansible_error/roles/basictasks/a/tasks/templates/test\r\n\t/tmp/ansible_error/roles/basictasks/a/tasks/test\r\n\t/tmp/ansible_error/templates/test\r\n\t/tmp/ansible_error/test on the Ansible Controller.\r\nIf you are using a module and expect the file to exist on the remote, see the remote_src option\r\n\r\n...ignoring\r\n\r\nPLAY RECAP ************************************************************************************************************************************************************\r\nlocalhost                  : ok=3    changed=0    unreachable=0    failed=0   \r\n```\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\n\r\nansible look into bad directories for templates\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\nTASK [basictasks/a : test error basictask] ****************************************************************************************************************************\r\nfatal: [localhost]: FAILED! => {\r\n    \"changed\": false\r\n}\r\n\r\nMSG:\r\n\r\nCould not find or access 'test'\r\nSearched in:\r\n\t/tmp/ansible_error/roles/templates/test\r\n\t/tmp/ansible_error/roles/basictasks/test\r\n\t/tmp/ansible_error/roles/basictasks/a/tasks/templates/test\r\n\t/tmp/ansible_error/roles/basictasks/a/tasks/test\r\n\t/tmp/ansible_error/templates/test\r\n\t/tmp/ansible_error/test on the Ansible Controller.\r\nIf you are using a module and expect the file to exist on the remote, see the remote_src option\r\n\r\n...ignoring\r\n\r\nPLAY RECAP ************************************************************************************************************************************************************\r\nlocalhost                  : ok=3    changed=0    unreachable=0    failed=0   \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/403867259","html_url":"https://github.com/ansible/ansible/issues/42585#issuecomment-403867259","issue_url":"https://api.github.com/repos/ansible/ansible/issues/42585","id":403867259,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzg2NzI1OQ==","user":{"login":"ansibot","id":6585283,"node_id":"MDQ6VXNlcjY1ODUyODM=","avatar_url":"https://avatars0.githubusercontent.com/u/6585283?v=4","gravatar_id":"","url":"https://api.github.com/users/ansibot","html_url":"https://github.com/ansibot","followers_url":"https://api.github.com/users/ansibot/followers","following_url":"https://api.github.com/users/ansibot/following{/other_user}","gists_url":"https://api.github.com/users/ansibot/gists{/gist_id}","starred_url":"https://api.github.com/users/ansibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansibot/subscriptions","organizations_url":"https://api.github.com/users/ansibot/orgs","repos_url":"https://api.github.com/users/ansibot/repos","events_url":"https://api.github.com/users/ansibot/events{/privacy}","received_events_url":"https://api.github.com/users/ansibot/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T15:35:28Z","updated_at":"2018-07-10T15:35:28Z","author_association":"CONTRIBUTOR","body":"cc @lwade @s-hertel @willthames\n[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)\n<!--- boilerplate: notify --->"}}
{"actor":{"display_login":"ansibot"}}