rolename not displayed in front of task when tasks name contains rolename

I noticed something odd today when looking at ansible output. Most tasks output looks like:

TASK [test_role : task without rolename]

Where the role name, “test_role” is in inserted in front of the task.

However if the task contains the role name, it’s not inserted:

TASK [task with rolename test_role]

Is that a bug or a feature?

https://github.com/jgilfoil/ansible-bug-roletaskoutput for a full example of what i mean.

It was a bug, it was fixed, then it showed up again, and now it’s fixed again, and now we have tests for it.

This is where it was fixed most recently: https://github.com/ansible/ansible/pull/72511

Thanks Matt!