Skip to main content

Ansible Installation on Linux (Ubuntu / CentOS)

Ubuntu

  1. Update package lists:
sudo apt-get update
  1. Install required packages:
sudo apt-get install -y software-properties-common
  1. Add Ansible PPA:
sudo add-apt-repository --yes --update ppa:ansible/ansible
  1. Install Ansible:
sudo apt-get install -y ansible
  1. Verify installation:
ansible --version

CentOS

  1. Update packages:
sudo yum update -y
  1. Enable EPEL repository:
sudo yum install -y epel-release
  1. Install Ansible:
sudo yum install -y ansible
  1. Verify installation:
ansible --version
info

pip install --upgrade cryptography paramiko

Notes

  • This setup installs Ansible on a single host for running playbooks.
  • No additional SSH configuration or Docker setup is included.
  • For multi-node management, Ansible requires SSH access to target hosts, but that is outside the scope of this document.