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/amazon-linux-2022/issues/57
## 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 [email protected]
__| __|_ )
_| ( / 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 expir