What is Ansible?
Ansible is a great tool to automate your server at many levels. You could write a playbook (set of commands) to configure a server from scratch and install apache/nginx, it's dependencies, then install WordPress and create database, etc.
I have been following Ansible for quite sometime now but couldn't get much time to look into it properly. I did use it for some server setup previously but didn't feel the need to dive deeper into it, until recently.
I use Ubuntu as a desktop operating system and those who use Ubuntu are mostly familiar with common Ubuntu commands but these common commands won't be enough for you to manage a server by yourself.
For me, it's really hard to remember all these commands; and that is where Ansible comes into play with it's playbooks. I don't know from where to start, because the possibilities of automation are almost endless.
In this post, I just want to share my experience with Ansible and how it got me up and running in few minutes. The picture above shows some of the major tasks that could be automated via Ansible, such as:
- Transfer hosting with databases
- Database management & configuration
- Creating VMs on the fly with default or custom configuration
- Application deployment (Development to Production)
You could literally automate your deployment phase from development to Quality Assurance to User Acceptance Testing (UAT) and then finally move to Production. The deployment which otherwise may take 15-20 minutes, however, by writing a simple/complex playbook on Ansible you have saved a lot of time and trouble for yourself.