Ansible is a configuration management tool used for application deployment and environment setup.
Ansible is far easier to learn when you can read how more full-featured playbooks are built using many tasks. An interesting note from my own experience is that when you get more experienced using Ansible there are many shortcuts in the task syntax so you can often make playbooks that have fewer lines of code than when you were less experienced yet the readability does not suffer.
Check out some of these example playbooks to learn more about how you may be able to structure your playbooks:
The prod directory under the Full Stack Python Deployment Guide open source project code contains a full playbook for deploying a standard Nginx, Gunicorn and PostgreSQL stack.
mac-dev-playbook configures macOS with various applications and developer tools such as Docker, Homebrew and Sublime Text.
An Ansible2 Tutorial is an incredibly detailed look at how one developer installs and run Ansible.
This retrospective from a developer on lessons from using Ansible exclusively for 2 years explains his rationale for choosing Ansible over Puppet and Chef, then goes through several use cases and best practices learned over time with the tool.
Using Ansible for deploying serverless applications provides a short overview with an example playbook how Ansible can also be useful for configuring serverless applications.
Painless Immutable Infrastructure with Ansible and AWS covers the steps needed for the unique authentication complexities that arise from using Amazon Web Services for your infrastructure.
CI for Ansible playbooks which require Ansible Vault protected variables
Deploy A Replicated MongoDB instance on AWS with Terraform and Ansible