spurin / diveintoansible-lab

Dive Into Ansible Lab
850 stars 531 forks source link

Failed to download metadata for repo ‘AppStream’ [CentOS] #105

Closed eaglerev36268 closed 5 months ago

eaglerev36268 commented 1 year ago

In Chapter 4, section "Ansible Playbooks- Creating and Executing," revision 1, the command, "ansible-playbook nginx_playbook.yaml" successfully skips the ubuntu hosts but fails to run as shown in video the CentOS hosts. Each host yields this message: fatal: [centos1]: FAILED! => {"changed": false, "msg": "Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried", "rc": 1, "results": []}

It may be because these are centOS 8 hosts, which have lost support since 31DEC2021. I tried to use this tutorial to fix it, but got this error instead: fatal: [centos1]: FAILED! => {"changed": false, "msg": "Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried", "rc": 1, "results": []}

Is there a way I can get around this and still follow along with the tutorial?

spurin commented 1 year ago

Hi @eaglerev36268

When did you build the lab by the way? I previously updated the images so that they use the vault repository to bypass any restrictions on this.

If it was recent I may need to revisit it

eaglerev36268 commented 1 year ago

I built this lab on 12OCT22. I didn't have any real issues throughout. I am on a WIN10 PC.

matthewstowe commented 1 year ago

Section 4.16 Ran into this same set of errors as described above.

fatal: [centos2]: FAILED! => {"changed": false, "msg": "Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried", "rc": 1, "results": []}

Built my lab on 2FEB23.

spurin commented 5 months ago

Closing, believe this was a repo issue at the time.