# includes in roles

**URL:** <https://forum.ansible.com/t/includes-in-roles/23835>\
**Category:** Ansible Project\
**Created:** [February 28, 2017, 12:20am UTC](https://forum.ansible.com/t/includes-in-roles/23835 "2017-02-28T00:20:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [February 28, 2017, 12:20am UTC](https://forum.ansible.com/t/includes-in-roles/23835/1 "2017-02-28T00:20:20Z")

</div>

With the introduction of static/dynamic includes, how does one use “include” in a role?

Previously I would say this

- name: foo  
include: bar.yaml

and it would find bar.yaml in the tasks/ directory of my role.

Now, however, it raises and exception about

the file\_name ‘/path/to/top-level/playbooks/bar.yaml’ does not exist, or is not readable"

where it seems to be looking for bar.yaml in the directory where my playbook exists and not from my role’s tasks directory

-tim

---

<div class="post-metadata">

**Author:** ![Tim1](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tim1](https://forum.ansible.com/u/Tim1)\
**Post date:** [February 28, 2017, 12:22am UTC](https://forum.ansible.com/t/includes-in-roles/23835/2 "2017-02-28T00:22:41Z")

</div>

nm

spel3ng of mai yah-mul fiel was incurekt

user error.
