How to install Ansible on Ubuntu 18.04/16.04/14.04 First step: Update the Ubuntu packages sudo apt-get update ; apt-get upgrade Now install Ansible by simple command sudo apt-get install ansible Verify the Ansible and Python Installed or not ansible --version python --version Create an inventory file where added all the host. Like – inventory [webserver] 52.66.239.76 52.66.235.128 13.233.67.129 # 13.233.122.239 ansible_user=ec2-user # 13.127.93.201 ansible_user=ec2-user Before proceed. We will generate and ssh public to which will be added to our all host in authorize_keys. To generate the ssh public key on Ansible machine. We will run the following command. ssh-keygen This command with generate a id_rsa.pub and id_rsa key under .ssh folder. We will copy the contents of id_rsa.pub and paste in each hosts mentioned under inventory file and append the contents under host user .ssh/authorize_keys. Make sure host_key_ckecking = flase is to be uncommented. (This line is in file under ...