Back to Engineering Notes
100 Days of DevOpsEngineering Note

Install Ansible

Install Ansible, an open-source automation tool used for configuration management, application deployment, and task automation.

๐ŸŽฏ Objective

Install Ansible, an open-source automation tool used for configuration management, application deployment, and task automation.

Ansible allows administrators to manage multiple servers from a single control node.

๐Ÿค– What is Ansible?

Ansible is an agentless automation tool that uses SSH to manage remote systems.

It is commonly used for:

Configuration management
Application deployment
Infrastructure automation
Server provisioning

Key features:

Agentless architecture
Simple YAML-based playbooks
Uses SSH for communication
Easy to learn and maintain

๐Ÿ“ฆ Step 1: Install Ansible (RHEL / CentOS / Rocky Linux)

Update system packages:

bash
sudo yum update -y

Install Ansible:

bash
sudo yum install ansible -y

๐Ÿ“ฆ Install Ansible (Ubuntu / Debian)

Update package list:

bash
sudo apt update

Install Ansible:

bash
sudo apt install ansible -y

๐Ÿ” Step 2: Verify Installation

Check the installed version:

bash
ansible --version

Example output:

bash
ansible [core 2.15]

๐Ÿ–ฅ๏ธ Step 3: Test Ansible Command

Run a simple test command:

bash
ansible localhost -m ping

Expected output:

bash
localhost | SUCCESS => {
    "ping": "pong"
}

๐Ÿ“ Important Ansible Files

โš ๏ธ Important Notes

Ansible works without installing agents on remote servers
Requires SSH access to managed nodes
Uses Python on remote systems
Control node sends commands to managed nodes via SSH

๐ŸŽฏ Result

Ansible installed successfully
Automation tool ready for configuration management
System ready to manage remote servers