Databases are a core part of the application stack in most enterprises, and there is a multitude of databases available on the Linux platform. Although many databases have their own management tools, Ansible is well suited to assist with a wide array of database management tasks, from the installation of database services and loading of initial data or schemas (or even restoring from backups) to handling day-to-day maintenance tasks. Combining Ansible's error handling and secure automation, there is virtually no limit to the types of database management tasks you can perform with Ansible.
In this chapter, you learned how to use Ansible to install database servers in a consistent and repeatable manner. You then learned how to import initial data and schemas, and how to extend this to automate backup tasks. Finally, you gained hands-on knowledge of some routine database...