Ansible yum module not working

In the first question of Labs - Modules - Packages in advanced ansible course, the playbook gets stuck at this command:

<172.20.1.100> SSH: EXEC sshpass -d10 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘User=“root”’ -o ConnectTimeout=10 -o ‘ControlPath=“/home/thor/.ansible/cp/3f3c327d54”’ -tt 172.20.1.100 ‘/bin/sh -c ‘"’"’/usr/bin/python /root/.ansible/tmp/ansible-tmp-1722770524.6661804-940-254207740424878/AnsiballZ_yum.py && sleep 0’“'”‘’

After several seconds, it gives below error.

“msg”: "http://repo1.sea.innoscale.net/centos/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found\nTrying other mirror.\nTo address this issue please refer to the below wiki article \n\nhttps://wiki.centos.org/yum-errors\n\nIf above article doesn’t help to resolve this issue please use https://bugs.centos.org/.\n\nhttp://mirror.den01.meanservers.net/centos/7.7.1908/os/x86_64/repodata/repomd.xml: [Errno 14]

The issue seems to be coming as the target “web1” is still on CentOS 7.

“ansible_distribution”: “CentOS”,
“ansible_distribution_file_parsed”: true,
“ansible_distribution_file_path”: “/etc/redhat-release”,
“ansible_distribution_file_variety”: “RedHat”,
“ansible_distribution_major_version”: “7”,
“ansible_distribution_release”: “Core”,
“ansible_distribution_version”: “7.7”,

Is it possible to upgrade the Centos targets used in the lab assignments to the latest version to see if that fixes the issue? If the CentOS version indeed is the cause, other labs in the course may also be impacted.

Looks like web1 was missed during our upgrade of the course. But you’re correct: yum module won’t work on web1:

[thor@ansible-controller playbooks]$ cat inventory 
web1 ansible_host=172.20.1.100 ansible_ssh_pass=Passw0rd ansible_user=root
[thor@ansible-controller playbooks]$ ssh [email protected]
The authenticity of host '172.20.1.100 (172.20.1.100)' can't be established.
ED25519 key fingerprint is SHA256:3GXvN+qm7DylFiOmpaHIo5r4ZWHeLRbOVgQF/QIEs5s.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '172.20.1.100' (ED25519) to the list of known hosts.
[email protected]'s password: 
[root@web1 ~]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

I’ve created a ticket on our internal system for the lab team; this is indeed a bug. Thanks for reporting this.

Thanks for looking into this! Do you have a timeline by which this would be fixed so that I can retry the lab?

It can take a few days. I know that an engineer is already assigned to this.

@rob_kodekloud Any idea if this has been fixed?

I don’t believe so. At least the ticket has not yet been updated to say that.

@rob_kodekloud Do you happen to have an update on this? I am unable to complete the course due to this issue. If possible, please get it prioritized as well.

Sorry for the delay. I’ve “pinged” the responsible engineers to ask for an update.

Thanks @rob_kodekloud ! Please try to get it done as soon as you can. Also, I believe the Ansible playground is impacted by this same issue.

@rob_kodekloud Any updates on the completion of this item? It has been almost 3 weeks since I posted this issue.

I know. I’ve just pinged engineering to find out what the hold up is.