Hello Michal,
It would allow for generic roles to provide tasks that don't get executed by default ... but can be triggered by providing a certain set of tags.
Imagine it was possible to do the following ...
ansible <playbook> --tags php-fpm,nginx,&service,&stop
which would match all tasks with exacly
- tags: [php-fpm, service, stop]
- tags: [nginx, service, stop]
... to stop the php-fpm and nginx service.
I can imagine a lot of use-cases where this would come in handy.
The idea came up while i was developing a "dashboard" for my development machine that would allow me to quickly change it's state by selecting tags (using autocompletion).
How cool would it be to just ... click together some expressive commands like "composer, install" , "mysql, install" ... and have the machine in the desired state.
It shouldn't be too hard to expose the provided tags as a variable + create a jinja function that can be used inside 'when' and evaluates the provided tags against the 'tags' variable ?
What are your thoughts about this? Could you share some implementation tips or am I on the completely wrong track here?