Ansible is the tool we use to automate database tasks.
What is Ansible?
- an open source automation platform.
- simple automation language that describes IT infrastructure into ansible playbooks.
- automation engine to run ansible playbooks
Why Ansible?
- it can be used to automate database administration tasks and application deployments related to databases.
- is simple, through ansible playbooks that are human readable
- is powerful, because it can be used for application deployments, database tasks automation and configuration management
- is agentless, through SSH (WinRM for Windows hosts) connections and push of Ansible modules on hosts
Ansible architecture
- control nodes where Ansible is installed and run from
- managed hosts
Managed hosts are stored in an inventory
Plays are created to ensure a host or a group of hosts are in a particular state.
A play performs a list of tasks on the hosts in the order specified by play
Each task runs a module, that can be Python script, shell script, etc, with some arguments
Playbooks are files containing sets of plays.
Tasks, plays and playbooks are implemented to be idempotent.
During next posts we will detail the usage of Ansible to automate database tasks.