Managing multi-container applications using Ansible
In this section, you will use the well-known Content Management System (CMS) application stack known as WordPress (https://wordpress.org). The WordPress application is based on multiple application stacks, including PHP, a web server, and a database. The WordPress application is available as a container image (https://hub.docker.com/_/wordpress). For the database, we will deploy another container using MariaDB (https://hub.docker.com/_/mariadb).
Please refer to the Chapter-10/deploy-wordpress-on-docker.yaml
file to see the Ansible playbook for deploying the WordPress CMS using Ansible. Follow these steps:
- We declared the essential parameters on top of the playbook, as shown in the following screenshot. Remember to store sensitive data such as database usernames and passwords using Ansible Vault (or Credential in Ansible Automation Controller) or other secret management services. These variables are then passed to the container...