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.
Links • Amazon Linux 2 • How 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
Conclusion
Now you know how to install the latest version of Ansible in Amazon Linux using the Amazon Extras Library and EPEL repositories.
Related Articles • Ansible Docker Guide • Ansible Nginx Guide • Ansible AWS Guide
Category: installation
Watch the video: How to install Ansible in Amazon Linux 2 (AWS EC2) - Ansible install — Video Tutorial