Ansible for Data Management
I continue the discussion on automation with a practical tool that every Data Guardian should learn.
Let’s discuss why Ansible is such an important tool in the Data Guardian’s toolbox.
What is Ansible?
So what is Ansible, and why is it so important?
Ansible is an orchestration tool that allows an operator to execute tasks in a given order, against any number of servers.
So it allows easy management of a fleet of databases, for instance.
And one of the most important concepts for Ansible is that tasks should be idempotent.
This means the tasks can be executed any given number of times with the same result.
You can be sure of the state of your servers when you run these tasks, even if the task doesn’t change anything due to prior runs.
Why should the Data Guardian learn Ansible?
Imagine altering a production schema across hundreds of database servers one at a time.
Not only would that be time consuming, it’s also error prone.
Copy and paste issues happen.
Executing the statement on the wrong server happens.
The last place you want to be making an error is on your production data!
What can the Data Guardian do with Ansible?
Ok so maybe you don’t have hundreds of database servers.
But we all have tasks that are repeatable, executed frequently and are important enough to not make mistakes.
Tasks like
- ensuring configuration changes in staging match production
- user management
- schema changes
- patching and upgrading database versions
- restore testing
- recovering from failures, both planned and unplanned
Ansible can help orchestrate all of these tasks.
The tasks are written in YAML, which is a simple configuration language. And execution of these tasks scales really well.
Conclusion
If you have tasks that you execute fairly regularly, that are repeatable, and too important to make mistakes, they are ripe for automating.
It takes some investment to get started with automation.
But Ansible is a great tool for orchestrating those tasks.
Every Data Guardian should be familiar with Ansible to level up their data management game!
Pingback: Database user management with ansible - DistributedDBA
Thank you for this.