ansible, ubuntu,

How to install Ansible on Ubuntu

Jun 06, 2021 · 1 min read · Post a comment

Ansible is an IT automation tool that can help you to simplify the deployments of your applications, efficiently manage your infrastructure servers, and provides a lot of features and integrations with all the cloud providers and the CI/CD tools.

Prerequisites

  • Ubuntu
  • sudo privileges

Install Ansible on Ubuntu

Step 1. Run the following command to update the OS packages:

sudo apt update

Step 2. Install software-properties-common package.

sudo apt install software-properties-common

Step 3. Now we need to add ppa:ansible/ansible to our system’s software source list.

sudo add-apt-repository --yes --update ppa:ansible/ansible

Step 4. To install the latest version of Ansible, run:

sudo apt install ansible

Step 5. Make sure that you have the latest Ansible version installed.

ansible --version

Remove Ansible from Ubuntu

Step 1. If you decide to remove Ansible from Ubuntu, run:

sudo apt-get purge --auto-remove ansible

Conclusion

This tutorial shows you how to install the latest Ansible version on Ubuntu, and if you decide to use other automation tool instead of Ansible there is a section on how to remove it depending on your needs. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.