Ansible Tutorial – Installing On Linux

This is a basic Ansible tutorial in which we are going to learn on how to install Ansible on Linux.

What is Ansible? – Quick Intro

Ansible is an open source automation engine that IT professionals use to automate IT provisioning, configuration management, and deployment of applications.

Ansible can not only automate Linux instances and servers, but also automate, manage and configure instances such as databases, storage devices, network devices, firewalls, etc.

For sys or network admins, Ansible is a great tool for automating a lot of tasks related to IT Infrastructures.

The Installation

I will be installing Ansible on Ubuntu 18.08 for this Ansible tutorial specifically. Feel free to use other versions as well.

We will use Pip, which is a standard package management-system that you use to install and manage software packages that are written in Python.

I am assuming that you don’t have Pip installed on your machine. So in order to install Pip, run the following command on your terminal:

sudo -H apt-get install python-pip

To verify the installation of Pip, run the following command:

pip --version 

Once we are done installing Pip, let’s install Ansible. Run the following commands on your terminal again:

sudo -H pip install ansible

After running the command, Pip will start to install Ansible. You can see on your terminal screen about what is going on behind the scene as Ansible is being installed.

In Addition, lookout for any error messages during the installation.

After installing Ansible, type in the following command to check for any available latest releases

sudo -H pip install ansible --upgrade

The preceding command should check for updates and install them automatically.

If no updates are available, then you should get a message stating that everything is already up to date.

Conclusion

This brings us to the end of this basic Ansible tutorial.

The commands that you are seeing on this guide should work easily with other Linux distributions, such as Linux Mint, Debian, Red Hat Enterprise Linux, and, CentOS

Feel free to comment below, if you face any problem during your installation of Ansible. I will be more than happy to help you out.

Further Reading

Ansible Documentation

Leave a Reply