AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 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 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", 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.

Failed installation of Ansible in Amazon Linux 2022 Preview (AWS EC2) - Ansible install — Video Tutorial

Failed installation of Ansible in Amazon Linux 2022 Preview (AWS EC2) using the internal and the EPEL (Extra Packages for Enterprise Linux) repositories.

Watch Video

Watch "Failed installation of Ansible in Amazon Linux 2022 Preview (AWS EC2) - Ansible install" on YouTube

What You'll Learn

Full Tutorial Content

How to install Ansible in Amazon Linux version 2022 Preview? Today I'm trying to install Ansible in the newest Amazon Linux 2022 Preview. Spoiler alert: it didn't go well! I'm Luca Berton and welcome to today's episode of Ansible Pilot. Links https://aws.amazon.com/it/linux/amazon-linux-2022/ https://aws.amazon.com/it/linux/amazon-linux-2022/faqs/ https://github.com/amazonlinux ## Playbook Let's jump in a quick live Playbook of how I tried to install the latest of Ansible in Amazon Linux 2022 Preview. code - Install-Ansible-Amazon Linux2022.sh ```bash #!/bin/bash $ sudo yum update -y $ sudo yum install ansible $ ansible --version ``` execution ```bash $ ssh -i key.pem ec2-user@34.245.160.35 __| __|_ ) _| ( / Amazon Linux 2022 AMI ___|\___|___| Preview http://aws.amazon.com/linux/amazon-linux-2022 [ec2-user@ip-172-31-33-113 ~]$ cat /etc/image-id image_name="al2022-ami" image_version="2022" image_arch="x86_64" image_file="al2022-ami-2022.0.20211118.0-kernel-5.10-x86_64.xfs.gpt" image_stamp="6548-3b38" image_date="20211119011708" recipe_name="al2022 ami" recipe_id="a9b1edc7-a202-b09e-9e6e-3ad0-b75b-4a14-2961cce6" [ec2-user@ip-172-31-33-113 ~]$ cat /etc/system-release Amazon Linux release 2022 (Amazon Linux) [ec2-user@ip-172-31-33-113 ~]$ cat /etc/os-release NAME="Amazon Linux" VERSION="2022" ID="amzn" ID_LIKE="fedora" VERSION_ID="2022" PLATFORM_ID="platform:al2022" PRETTY_NAME="Amazon Linux 2022" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2022" HOME_URL="https://amazonlinux.com/" [ec2-user@ip-172-31-33-113 ~]$ sudo su [root@ip-172-31-33-113 ec2-user]# yum install ansible Last metadata expiration check: 0:07:05 ago on Sun 05 Dec 2021 12:51:14 PM UTC. No match for argument: ansible Error: Unable to find a match: ansible [root@ip-172-31-33-113 ec2-user]# yum install epel Last metadata expiration check: 0:07:21 ago on Sun 05 Dec 2021 12:51:14 PM UTC. No match for argument: epel Error: Unable to find a match: epel [root@ip-172-31-33-113 ec2-user]# yum install epel-release Last metadata expiration check: 0:07:27 ago on Sun 05 Dec 2021 12:51:14 PM UTC. No match for argument: epel-release Error: Unable to find a match: epel-release [root@ip-172-31-33-113 ec2-user]# yum repolist repo id repo name amazonlinux Amazon Linux 2022 repository [root@ip-172-31-33-113 ec2-user]# yum search ansible Last metadata expiration check: 0:08:35 ago on Sun 05 Dec 2021 12:51:14 PM UTC. No matches found. [root@ip-172-31-33-113 ec2-user]# dnf update Last metadata expiration check: 0:10:19 ago on Sun 05 Dec 2021 12:51:14 PM UTC. Dependencies resolved. Nothing to do. Complete! [root@ip-172-31-33-113 ec2-user]# dnf repoinfo Last metadata expiration check: 0:12:11 ago on Sun 05 Dec 2021 12:51:14 PM UTC. Repo-id : amazonlinux Repo-name : Amazon Linux 2022 repository Repo-revision : 1637274479 Repo-updated : Thu 18 Nov 2021 10:27:59 PM

About This Tutorial

Read the full written article: Failed installation of Ansible in Amazon Linux 2022 Preview (AWS EC2) - Ansible install

Topics Covered

Related Video Tutorials