Ansible needs to be installed on the controller. Since Ansible is agentless and manages nodes using SSH transport, no additional setup is needed on the nodes except for ensuring that the SSH service is running. These instructions are specific to the Ubuntu distribution of Linux, but when you are using other Linux operating systems the steps are pretty same.
The steps are as follows:
1. Login to Your System and Connect to the Internet.
2. Update the repository and install the necessary update.
Command: $ apt -y update
Command: $ apt -y upgrade
3. Install Ansible: Just use the below command this will automatically install all dependency.
Command: $ sudo apt install ansible -y
4. Validate ansible installation by the following command:
Command: $ ansible --version
Hence we did it. Ansible is installed on your system. To start working with ansible go to the "/etc/ansible" directory.