Install Ansible

Ubuntu: Install Ansible

Ansible is an open-source automation tool used for configuration management, application deployment, and orchestration. This guide explains how to install Ansible on Ubuntu.


Step 1: Update Package Lists

sudo apt update


Step 2: Install Ansible

sudo apt install ansible -y


Step 3: Verify Installation

ansible --version


Step 4: Configure Inventory

Edit /etc/ansible/hosts and add your servers:

[webservers] 192.168.1.10 192.168.1.11

Best Practices

  • Use SSH keys for secure connections
  • Group servers by role (web, db, cache)
  • Use playbooks for repeatable automation