# ansible tries to include the wrong file

**URL:** <https://forum.ansible.com/t/ansible-tries-to-include-the-wrong-file/26407>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 3, 2018, 10:47am UTC](https://forum.ansible.com/t/ansible-tries-to-include-the-wrong-file/26407 "2018-01-03T10:47:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_C1](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@Mike\_C1](https://forum.ansible.com/u/Mike_C1)\
**Post date:** [January 3, 2018, 10:47am UTC](https://forum.ansible.com/t/ansible-tries-to-include-the-wrong-file/26407/1 "2018-01-03T10:47:22Z")

</div>

Hi,

i’ve got this repo [https://github.com/mhristof/shorty-hefty-exile](https://github.com/mhristof/shorty-hefty-exile) and its failing with the following error

`  
fatal: [localhost]: FAILED! =\> {“reason”: “Unable to retrieve file contents\nCould not find or access ‘/etc/ansible/roles/oracle-java/tests/debian/ubuntu.yml’”}

`

To reproduce, clone the repository and type  
`make`

The failure seems to go away when i use role\_path to point to the file to include

`

index 6d08982…880ca43 100644  
— a/tasks/debian/main.yml  
+++ b/tasks/debian/main.yml  
@@ -2,4 +2,4 @@

- debug:  
msg: including debian file for {{ ansible\_distribution }}

– include: “debian/{{ansible\_distribution|lower|replace(’ ', ‘’) }}.yml”  
± include: “{{ role\_path }}/tasks/debian/{{ansible\_distribution|lower|replace(’ ', ‘’) }}.yml”

`

Any ideas ?
