How to Install Ansible on Ubuntu 24.04

Post Date: October 2, 2018
Last Updated: October 2, 2026

Introduction

Install Ansible on Ubuntu 24.04 using the APT package manager with this step-by-step guide. Ansible is an open-source automation and configuration management tool used to automate server administration, software installation, configuration management, and application deployment.

Ansible is widely used in DevOps environments because it allows administrators to automate tasks across multiple systems from a central control node. This guide explains how to install Ansible on Ubuntu 24.04 LTS and verify that the installation was completed successfully.

Prerequisites

Before installing Ansible on Ubuntu 24.04, ensure that you have:

  • A server running Ubuntu 24.04 LTS.
  • A user account with sudo privileges.
  • An active internet connection.
  • Access to the Ubuntu terminal.

Implementation

Step 1: Update the Package Repository

First, update the Ubuntu package repository to ensure the latest package information is available.

sudo apt update

Step 2: Install Ansible on Ubuntu 24.04

Install Ansible using the APT package manager:

sudo apt install ansible -y

The -y option automatically confirms the installation.

APT will install Ansible along with the required dependencies.

Step 3: Verify Ansible Installation on Ubuntu 24.04

After the installation is completed, verify the installed Ansible version:

ansible --version

Example output:

If the command displays the Ansible version, the installation was successful.

Step 4: Check the Ansible Executable

You can verify the location of the Ansible executable using:

which ansible

Expected output:

/usr/bin/ansible

This confirms that Ansible is installed and available in the system PATH.

Step 5: Verify the Installed Package

You can also confirm that the Ansible package is installed:

apt list --installed 2>/dev/null | grep ansible

Expected output:

Conclusion

Installing Ansible on Ubuntu 24.04 LTS is a straightforward process. By updating the system packages, installing Ansible using APT, and verifying the installation with the Ansible version and executable checks, you can prepare your Ubuntu server for automation tasks.

After Ansible has been installed successfully, you can configure the inventory and SSH authentication to start managing remote servers and automating administrative tasks. For additional information, refer to the official Ansible documentation link.

FAQs

1. What is Ansible?

Ansible is an open-source automation and configuration management tool used to automate server administration, software installation, configuration management, and application deployment.

2. How do I install Ansible on Ubuntu 24.04?

You can install Ansible using the Ubuntu APT package manager with the following commands:

sudo apt update
sudo apt install ansible -y

3. How can I verify that Ansible is installed?

Run the following command to check the installed Ansible version:

ansible --version

If the command displays the Ansible version, the installation was successful.

How to Create and Use an Ansible Playbook

Talk to Our Ansible Experts

Need help installing, configuring, or managing Ansible environments? Our team can assist with Ansible installation, configuration, automation, inventory management, SSH setup, server management, troubleshooting, and ongoing infrastructure administration. Get in touch with our team here.

Naveen Prasad

Naveen Prasad has been associated with Pheonix Solutions for the past 2.5 years as a DevOps Engineer. His responsibilities are focused on cloud infrastructure, Linux server administration, Docker, CI/CD, monitoring, backups, and security. Automation, infrastructure troubleshooting, and continuous learning of new technologies are pursued to support the development of reliable, secure, and scalable systems.

Leave a Reply

Scroll to Top