Ansible is one of the top configuration management and orchestration tools out there. Released over half a decade ago, Ansible has one of the lowest learning curves among all the configuration management tools out there. It is simple to get started with Ansible since there are no agents required on the remote end, and the transport is SSH, which is preinstalled on almost all Linux servers. One of the major reasons why Ansible is so popular is because it comes with over a thousand modules for various tasks and operations. These modules provide us with the capability to manage infrastructure, servers, deployments, and common software.
One aspect of these modules is cloud management. As cloud is becoming ubiquitous, the need to create infrastructure as code is becoming prominent. We want automated, unattended, and repeatable ways to create an infrastructure with a cloud provider of our choice. Good for us that Ansible has over 300 modules specifically written to interact with the APIs of over 20 cloud providers. These modules let us create, destroy, and manage resources making things automated and repeatable.
In this book, we are going to look at some of the popular cloud providers and use Ansible to create various components of an infrastructure. Each chapter covers a cloud provider and the deployment of an application backed by the database. We will learn, step by step, how to build an infrastructure from scratch and deploy an application. The sample application that we have written has two versions; one uses SQLite, and the other uses MySQL. We will use these variants to demonstrate cloud providers' capabilities and deployment methodology using Ansible. We suggest our readers to go through the Chapter 1, Getting Started with Ansible and Cloud Management to learn more about these applications. For readers who are getting started with cloud automation, we recommend reading the chapters from the beginning. A seasoned user of Ansible and the cloud providers will be able to look at any recipe from the chapter and be able to make out what was discussed in previous recipes. Finally, we suggest that our readers to try executing the code for a deeper understanding of how Ansible works with cloud providers.