# How to use a different entry point in the \`roles\` part

**URL:** <https://forum.ansible.com/t/how-to-use-a-different-entry-point-in-the-roles-part/39659>\
**Category:** Get Help\
**Tags:** role\
**Created:** [January 16, 2025, 10:02pm UTC](https://forum.ansible.com/t/how-to-use-a-different-entry-point-in-the-roles-part/39659 "2025-01-16T22:02:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![elrond](https://avatars.discourse-cdn.com/v4/letter/e/5daacb/32.png) [@elrond](https://forum.ansible.com/u/elrond)\
**Post date:** [January 17, 2025, 5:28pm UTC](https://forum.ansible.com/t/how-to-use-a-different-entry-point-in-the-roles-part/39659/3 "2025-01-17T17:28:00Z")

</div>

> [@jrglynn2](#):
>
> I don’t know if there is official documentation concerning this, but when I started using Ansible several years ago, multiple people on IRC told me not to use the `roles:` , as it was the “old” way to do it and would be deprecated…

I have found this old thread that also suggests this: ["import\_role" vs "roles"](https://forum.ansible.com/t/import-role-vs-roles/28734)

IMHO it would really be helpful, if there was some more information on possible deprecation plans.

> [@jrglynn2](#):
>
> So I have never used `roles:` myself, and don’t believe there is any benefit to it…

Benefit… depends on the view. If you have a few simple roles, then

```yaml
roles:
- role1
- role2
- role3

```

is quite concise. Doing the same in the new syntax is something like this:

```yaml
tasks:
- ansible.builtin.import_role:
    name: role1
- ansible.builtin.import_role:
    name: role2

```

which feels quite verbose.

Yes, you could use `include_role` and `loop:`. But `include_role` has different semantics than `import_role` (which is closer to `roles:`).

---

_[View the full topic](https://forum.ansible.com/t/how-to-use-a-different-entry-point-in-the-roles-part/39659)._
