# roles

**URL:** <https://forum.ansible.com/t/roles/12720>\
**Category:** Ansible Project\
**Created:** [April 25, 2013, 6:41am UTC](https://forum.ansible.com/t/roles/12720 "2013-04-25T06:41:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [April 25, 2013, 6:41am UTC](https://forum.ansible.com/t/roles/12720/1 "2013-04-25T06:41:38Z")

</div>

Do all files in a task role directory get included automatically, or only the main.yml?

If I have:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;roles/base/tasks/swappiness.yaml  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/ntpd.yaml

Would they both get included when I add the role "base"?  
Or do I have to add a main.yml file in there?

---

<div class="post-metadata">

**Author:** ![GW1](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@GW1](https://forum.ansible.com/u/GW1)\
**Post date:** [April 25, 2013, 9:00am UTC](https://forum.ansible.com/t/roles/12720/2 "2013-04-25T09:00:03Z")

</div>

Hi,

You have to include main.yml. It is just simple as that and it also allows you to specify the order (can also be used for tags):
