I have a problem updating Centos 8 systems due to repositories. This is my task and it works on Red Hat and Almalinux:
- name: Install the latest version of yum-utils
become: yes
become_method: sudo
yum:
name: yum-utils
state: latest
update_cache: yes
When I run the Playbook, I get this result:
"Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata / repomd.xml:"
I replaced the repositories with http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/
and, running the "yum update
" command directly from the CentOS system it works, from the playbook it doesn't. I can't understand, can anyone help me?
The versions of Python are 3.6.8 and Ansible 2.9.27
Thanks for your help