Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
CentOS-8 - AppStream 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository ‘AppStream’:
@raafatadly23
In case, If you will get a message that ansible is not available after running sudo yum install ansible, then try to install epel-release first (sudo yum install epel-release).
Hey, @ukez15
I tried and searched for a solution on the internet. It worked.
Switch to the root user by running the command - sudo -i
Use comment(#) to resolve below issues -
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Error: Failed to download metadata for repo 'base': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Then run on the terminal -
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-AppStream.repo
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-AppStream.repo
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Base.repo
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Base.repo
yum search epel-release
yum install epel-release
yum install ansible
Mirror list seem to have stopped working late last year for centos. instead of mirrorlist use vault, so go to /etc/yum.repos.d/ directory, you want to make changes to these file: