We had this error the other day when running our vagrant script (centOS box):
[Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
This tried and failed on every single mirror, and basically hung our deployment.
After reading up on it a bit, apparently this occurs when the mirrors are syncing - not sure why that would cause an issue, but after about 4 hours (when they had synced) the error went away.
We did find a workaround though, delete the existing cached repo folder from the centOS box before running yum.
To do this simply on the box do..
"ssh on box"
sudo rm -rf /etc/yum.repos.d/epel.repo
Or as part of our ansible provisioning script...
"ansible provisioning playbook"
tasks: - name: Remove old epel repo from yum as this can cause conflicts with the mirrors shell: sudo rm -rf /etc/yum.repos.d/epel.repo ignore_errors: yes - name: Install CentOS Dependencies. yum: name={{item}} state=installed with_items:
- httpd - mysql ..................
m