In my experience, I've really only used `import_role` as a task-level declaration, Occasionally after some preliminary setup tasks.
The `roles` declaration at the top of the playbook will always execute before the set of tasks in a given playbook.
It's possible there are other, potentially larger, facets that I'm missing but for the most part the only significant distinctions I've been able to make between the two of them is ordering, specifically that:
- roles declared in the roles heading will be executed before all tasks in a playbook
- tasks that use the import_role module(?) are able to be arranged wherever the playbook writer chooses in the task list, giving a lot more flexibility on the side of playbook designers.
Hope this helps!