But application have similar between them tasks which described in “main.yml” of role “common”
What is the best way have only one source to those similar tasks without having 2 or more versions and duplicate them across projects. From my point of view:
It can be separate dir:
playbooks/common_tasks.yml
You might re-examine whether it is appropriate for a role and a playbook as it feels like your playbooks are too heavy.
Roles ideally should be reusable logic for a given context you can apply to multiple situations. For example, you might have multiple kafka/mysql/etc clusters for different uses that a single role given the necessary info via playbook and inventory can manage. If you need to build higher order reusable roles, you can have roles with dependent roles that compose them to your ends; leaving your playbooks thinner. Playbooks ultimately should be highest order orchestration that isn’t bogged down into all of the technical details.
Think re-examine how i look into the roles is helped to me. Now after i reorganize my roles slightly different is helped for me:
Each role have purpose of install nginx, monitoring, etc.
And after that high level playbook will combine them together to get application worked. For example distributed wordpress, or ha lamp stack rather than I have before each role to configure application.