Skip to main content
πŸ“¬ Get weekly Production AI insights Practical notes on Kubernetes, AI infrastructure and platform engineering. No spam. Subscribe free
Install Ansible on Ubuntu 24.04 LTS
DevOps

Install Ansible on Ubuntu 24.04 LTS: Complete Guide (2026)

Step-by-step guide to install Ansible on Ubuntu 24.04 LTS. Repository setup, installation, configuration, and verification.

LB
Luca Berton
Β· 1 min read

Here is how to install Ansible on Ubuntu 24.04 LTS. Tested and verified.

Prerequisites

  • Ubuntu 24.04 LTS installed and updated
  • Root or sudo access
  • Internet connection

Step 1: Update System

sudo apt update && sudo apt upgrade -y

Step 2: Choose a Package Source

Ubuntu 24.04’s universe repository already includes Ansible, and universe is enabled by default on standard Ubuntu installs β€” so no extra repository is required for a stable, well-tested version. If you want the latest upstream release instead, add the official Ansible PPA:

# Optional: latest upstream Ansible via the official PPA
sudo apt install -y software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible

Step 3: Install Ansible

sudo apt install -y ansible

For a minimal install with just the core engine (no bundled collections):

sudo apt install -y ansible-core

Step 4: Verify Installation

ansible --version
ansible localhost -m ping

Expected output shows the installed version, followed by a "ping": "pong" response.

Step 5: Verify Collections and Configuration

# List installed collections
ansible-galaxy collection list

# Install additional collections as needed
ansible-galaxy collection install community.general

# Inspect the active configuration
ansible-config view

Ansible is agentless and has no daemon or background service β€” it connects to managed hosts over SSH only when you run a command or playbook, so there is nothing to systemctl enable or check with systemctl status.

Troubleshooting

Package Not Found

Refresh the local package index and confirm you’re on Ubuntu 24.04 (noble):

sudo apt update
lsb_release -a
apt-cache policy ansible

Outdated Ansible Version

The universe package version can trail the latest upstream release. If you need a newer version, add the official PPA from Step 2, or install into an isolated environment with pip/pipx β€” see Install Ansible with pip in a Virtual Environment.

Uninstall

sudo apt remove -y ansible

If you added the official PPA and want to remove it too:

sudo add-apt-repository --remove ppa:ansible/ansible

About the Author

I am Luca Berton, AI and Cloud Advisor. Book a consultation to get help with your infrastructure setup.

Free 30-min Production AI consultation

Book Now