Introduction to Ansible - Part 1

Introduction to Ansible - Part 1

In the next few blog posts I would try to give a brief Ansible introduction and how to get started with Ansible. I strongly recommend that you follow through and test the things that you learn on your own! 


We would need 3 servers:
  • 1 would be our 'master' node where we would install Ansible.
  • 1 Web server
  • 1 Database server
I would be using Digital Ocean. To make things even better you can use my referral link to get a free $50 credit that you could use to deploy your virtual machines and test the guide yourself on a few Digital Ocean servers:

What is Ansible?

Ansible is basically an agentless automation tool that enables you to easily configure and deploy systems. Ansible is quite simple but yet really powerful. It operates over SSH.
You can install Ansible on a single control server where you would have your host inventory files as well as your playbooks. And then you would use this server to control, configure and manage many different machines as long as you have SSH access.
The actual 'work' is done on the remote hosts.

Ansible Documentation

If you want to be successful with Ansible, it is really important to know where to find the Ansible documentation as there are a lot of Ansible modules with different specifications and you should be able to find the documentation for those modules.
You can find the official documentation here:
There is a lot of useful information on this page but the most important one is the Modules Index one:
There are thousands of well documented modules and how to use them.
You can also use the ansible-doc command, it provides you with similar information as the site but the cool thing is that you would have that information right in your terminal. Here's an example:
ansible-doc lineinfile
That way you would get the documentation regarding the module and all of its different parameters. 
You can take a look at the man page for the ansible-doc command as well to see the different parameters that you could use.

In the next section I will go ahead and setup my three Virtual Machines on Digital Ocean and install Ansbile on the master node.
Link to Part 2:
I hope that this was helpful! Let me know in case you have any questions!

Coffee For Me