Install Ansible on Ubuntu - How to setup Ansible on Ubuntu 18.0.4 - Ansible install on Ubuntu

Ansible is #1 configuration management tool. It can also be used for infrastructure provisioning as well. or You can use in combination of Terraform which can take care of infra automation and Ansible can do configuration management.

The best way to install Ansible for Ubuntu is to add the project's PPA (personal package archive) to your system. You also would need Boto framework for provisioning resources in AWS cloud.



Update Repository

sudo apt-get update
sudo apt-add-repository -y ppa:ansible/ansible


then you need to refresh the package by executing the below command:
sudo apt-get update



Now you can install Ansible:
sudo apt-get install -y ansible


sudo apt install python-pip -y
 ( this is just comment -  Package manager for python)

Install Boto Framework
sudo pip install boto
(This is AWS SDK for python)

sudo pip install boto3
sudo apt-get install python-boto -y
pip list boto | grep boto
(the above command should display below output)
Ignore warning in Red color.


ansible --version

you will see this output..
ansible 2.9.9
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.17 (default, Apr  15 2020, 14:50:18) [GCC 5.4.0 20160609]

Post a Comment

0 Comments