# Ansible newbie, reporting misleading documentation on roles

**URL:** <https://forum.ansible.com/t/ansible-newbie-reporting-misleading-documentation-on-roles/20055>\
**Category:** Ansible Project\
**Created:** [December 21, 2015, 6:05pm UTC](https://forum.ansible.com/t/ansible-newbie-reporting-misleading-documentation-on-roles/20055 "2015-12-21T18:05:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spencer\_Brown](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@Spencer\_Brown](https://forum.ansible.com/u/Spencer_Brown)\
**Post date:** [December 21, 2015, 6:05pm UTC](https://forum.ansible.com/t/ansible-newbie-reporting-misleading-documentation-on-roles/20055/1 "2015-12-21T18:05:07Z")

</div>

In the ansible docs for [Playbook Roles and Include Statements](http://docs.ansible.com/ansible/playbooks_roles.html), it says that once you set up a role x and reference it in a playbook:

> - Any copy tasks can reference files in roles/x/files/ without having to path them relatively or absolutely
> 
> - Any script tasks can reference scripts in roles/x/files/ without having to path them relatively or absolutely
> 
> - Any template tasks can reference files in roles/x/templates/ without having to path them relatively or absolutely
> 
> - Any include tasks can reference files in roles/x/tasks/ without having to path them relatively or absolutely

This was misleading to me, I assumed I could just create a playbook, call in the role, and reference files and templates in the role without qualification.

The truth is: Any tasks WITHIN THE ROLE’S DIRECTORY STRUCTURE can reference files without having to path them. **Not** “Any tasks”.

I finally figured this out by finding [this GitHub issue](https://github.com/ansible/ansible/issues/11566), within which it is pointed out by jimi-c that “the role\_path is only searched when the task itself comes from a role”.

Upon reflection, it makes sense, because a playbook can have multiple roles, and which one should it search? But for a newbie, this is quite confusing.

It would be nice if the documentation were updated.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [December 21, 2015, 6:12pm UTC](https://forum.ansible.com/t/ansible-newbie-reporting-misleading-documentation-on-roles/20055/2 "2015-12-21T18:12:52Z")

</div>

I hope this is clearer  
[http://github.com/ansible/ansible/commit/593d80c63d408012550850eb06d85387588cee3b](http://github.com/ansible/ansible/commit/593d80c63d408012550850eb06d85387588cee3b)
