How to install Ansible on Ubuntu
In this article, We are going to learn how to install Ansible on Ubuntu. Ansible is a powerful automation and remote management tool that allows you to administer all your remote machines. It is cross-platform and can work on most machines with no requirements for additional software and also offers security by utilizing SSH and Python on remote machines to execute specified tasks.
It supports two methods for managing remote machines:
This is the most common method of managing remote machines. You can execute commands on remote machines without any additional software.
This is a more advanced method of managing remote machines. You can execute commands on remote machines using Ansible Playbooks.
Pre-requisites
Once you have both of the above requirements met, we can begin.
Install Ansible on Debian/Ubuntu
Before, we install Ansible on Ubuntu we need to update our packages. To do this, we use the following command:
1
2
sudo apt-get update
sudo apt-get dist-upgrade -y
1 | sudo apt-get update |
Now, we can install Ansible using the following command:
1 | sudo apt install software-properties-common |
Check Ansible is installed
To check is Ansible is installed, we can use the following command:
1
ansible --version
1 | ansible --version |