Hi,
Thanks for pointing that out. I understood the concept now (specifying a tag to a role means flagging all role's tasks with the tag).
The reason why I wanted to do it differently is because of the following scenario:
Assume you have tasks in two different roles. First, you want to execute a subset of tasks in the roles (e.g. Checks before an update), then you want to execute another subset (e.g. The actual update).
If roles belong to different entities of the infrastructure, and all tasks of one role are located in its main.yml task file, I wanted to execute tasks this way: first all tasks tagged with checkupdate, then all tasks with update. The first update task should only be executed if all checkupdate tasks suceeded.
While I can concatenate playbooks (one for checkupdate, one for update), I haven't found a way to execute the tasks from a single playbook.
However (if you dont correct me on this), I came to the conclusion, that my role setup was wrong from the start. Or putting it in another way, I wanted an execution order of tasks in the way RoleA: T1a, RoleA: T2a, RoleB: T1b, RoleA: T3a, ...
I guess I should refactor my roles so that the checkupdate tasks are be tagged as update instead and executed first, and it should not matter if role A is completely executed before role B...?
Anyway, thanks again for your clarification.