In addition to the regular modules provided in the standard library, there are also third-party components to allow for code reuse. You can test such components individually, which also makes your deployment code more robust. Such components are called roles. They contain a set of tasks to make a machine fit to take on a specific role, such as webserver, db, or docker. While some roles prepare the machine to provide particular services, other roles may be more abstract, such as the popular ansible-hardening role. This has been created by the OpenStack team and it makes it much harder to break into a machine secured by using this role.
When you start to understand the language Ansible uses, all the playbooks cease to be just the scripts. In turn, they will become the documentation of the deployment process. You can either use them verbatim by running Ansible, or you can read the described tasks and perform all the operations manually...