Install Ansible On Ubuntu Server 20.04

This blog post will show you how to install Ansible on Ubuntu Server 20.04 host. The installed version will be 2.9.6.

Requirements

The requirements to install Ansible are minimal, and all you need is Python 2.7 (If using version 2) or Python 3.5 (if using version 3). The server that will run Ansible is also called a control node.

Install

Below are all the commands you need to run to install Ansible on your Ubuntu server 20.04.

sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt install ansible

By default Ansible will use the following directories:

config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/shimon/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible

To verifiy and confirum that the installation was secuesfull, run the following command.

ansible --version

Processing…
Success! You're on the list.

Posted

in

by