Skip to main content
πŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy β€” plus the companion book on Leanpub & Amazon. Start Learning
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.

#Ansible #Ubuntu 24.04 LTS #Installation #Linux #DevOps
Share:
Ansible & Python Training

Need help with Ansible & Python Training?

Level up your automation skills with expert-led Ansible and Python training.

Learn more about Ansible & Python Training

Want to operate this yourself, in production?

Take the free AI Platform Engineer Readiness Scorecard to see which skills transfer β€” then build a production-shaped AI platform in the 4-week Bootcamp.

Take the Scorecard β†’
Luca Berton β€” AI & Cloud Advisor, Docker Captain

Luca Berton

AI & Cloud Advisor Β· Docker Captain Β· KubeCon Speaker

15+ years in enterprise infrastructure. Author of 8 technical books, creator of Ansible Pilot (1M+ YouTube views, 648K site users). Former Red Hat engineer. Speaker at KubeCon EU 2026 and Red Hat Summit 2026.

Free 30-min AI & Cloud consultation

Book Now