AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,100 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example" published by Apress, and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

How to install Ansible in Amazon Linux 2 (AWS EC2) - Ansible install

By Luca Berton · Published 2024-01-01 · Category: installation

How to install Ansible in Amazon Linux 2 using the Amazon Extras Library \"amazon-linux-extras\" and the EPEL (Extra Packages for Enterprise Linux) repositories.

How to install Ansible in Amazon Linux version 2? Today we're going to talk about the easier way to install and maintain Ansible inside Amazon Linux 2 using the Amazon Extras Library and EPEL repositories. I'm Luca Berton and welcome to today's episode of Ansible Pilot.

How to install Ansible in Amazon Linux 2 • "ansible2" topic in Extras Library repository • "ansible" in Extra Packages for Enterprise Linux (EPEL) additional packages for Enterprise Linux: Red Hat Enterprise Linux (RHEL), Rocky Linux and Scientific Linux (SL), Oracle Linux (OL), and Amazon Linux

Today we're talking about How to install Ansible in Amazon Linux 2. The good news is that Ansible is included in the Extras Library included in Amazon Linux 2 repository using the "amazon-linux-extras" command. Another option is to install and maintain Ansible inside Amazon Linux 2 is using the Extra Packages for Enterprise Linux (EPEL) additional repository. This repository is maintained by the Fedora Special Interest Group and manages a high-quality set of additional packages for Enterprise Linux: Red Hat Enterprise Linux (RHEL), Rocky Linux and Scientific Linux (SL), Oracle Linux (OL), and Amazon Linux.

LinksAmazon Linux 2How do I enable the EPEL repository for my Amazon EC2 instance running CentOS, RHEL, or Amazon Linux?Extras library (Amazon Linux 2)Extra Packages for Enterprise Linux (EPEL)

Playbook

Install Ansible in Amazon Linux (EC2) 2 using the Amazon Extras Library and EPEL repositories.

Here are the steps on how to install Ansible in Amazon Linux 2 (AWS EC2): Update the package list: Install the Ansible package: Check the Ansible version: Verify that Ansible is installed correctly by running a simple playbook:

This playbook will print the following output:

If you see this output, then Ansible is installed and configured correctly.

Amazon Extras Library code • Install-Ansible-Amazon Linux2-Amazon Extras Library.sh

Amazon Extras Library execution

Amazon Extras Library after execution

EPEL code • Install-Ansible-Amazon Linux2-EPEL.sh

EPEL execution

EPEL after execution

code with ❤️ in GitHub

Conclusion

Now you know how to install the latest version of Ansible in Amazon Linux using the Amazon Extras Library and EPEL repositories.

Related ArticlesAnsible Docker GuideAnsible Nginx GuideAnsible AWS Guide

Category: installation

Watch the video: How to install Ansible in Amazon Linux 2 (AWS EC2) - Ansible install — Video Tutorial

Browse all Ansible tutorials · AnsiblePilot Home