Its hard to understand without seeing your playbook tasks but it sounds like you want to loop through a set of tasks, which you can do by looping over include_role or import_role However it is well worth reading through this thread
https://github.com/ansible/ansible/issues/13262
Depending on what you are trying to achieve there might be another way to go about it which doesn't involve complex looping and making a playbook that might be hard for others to understand.
You might, for example, be able to use handlers to trigger certain tasks only when another has reported that it is changed.
Or if you have some very specific requirements maybe some parts might be best written as a script or a custom module.
Hope this helps but its hard to make useful suggestions without seeing the detail of what you are trying to achieve.
Jon