I am trying to set up a system with multiple roles (e.g., webserver, database-server, mailserver etc.)
Each of the roles requires the installation of some software packages defined as their own task in the main.yml
for each role.
Does ansible have a way to detect (or explicitly state it in a task) that in a certain play there will be multiple package installs and allow batching them together and skipping the later install steps?