Ansible, containers, and CI/CD
Containerizing applications will give you more options for integrating, delivering, and deploying them since most of the tools support automated builds, tests, and executions. A typical containerized application workflow can be seen in the following diagram:
Figure 10.6 – Typical CI/CD tasks in a Docker-based deployment
Most of the tasks in the preceding diagram can be automated using Ansible as the Ansible collection for Docker and Podman contains several modules to support building, running, and managing containers on your container host. Either implement the entire workflow using Ansible or use Ansible with our favourite CI/CD tools and execute the tasks more flexibly. You will learn how to integrate Ansible with Jenkins in Chapter 12, Integrating Ansible with Your Tools.
In this next section, you will learn how to manage containers using Ansible and manage the container life cycle.