1. Update Your System

Open your terminal and run:

sudo apt update
sudo apt upgrade -y

2. Install Ansible

Install Ansible using apt:

sudo apt install ansible -y

Verify the installation by checking the version:

ansible --version

Expected Output Example:

image.png


3. Creating an Ansible Inventory

An inventory file lists the hosts you want to manage. For this experiment, you can use the local host.

Create an Inventory File

  1. Open your text editor to create a file called hosts.ini:
gedit hosts.ini