We have seen how we can automate simple tasks, but what we have seen up till now will not solve all of your problems. This is because playbooks are very good at executing operations, but they are not very good at configuring huge amounts of machines, because they will soon become messy. To solve this, Ansible has roles.
My definition of a role is a set of playbooks, templates, files, or variables used to achieve a specific goal. For instance, we could have a database role and a web server role so that those configurations stay cleanly separated.
Before starting to look inside a role, let's talk about organizing a project.