Closed tamsky closed 6 years ago
Set a priority when adding the yum repo that is a lower number (closer to 1) than the CentOS/Amazon linux default. [1]
1
On Amazon Linux 1, (and likely on CentOS) the vendor's repo, at /etc/yum.repos.d/amzn-main.repo has relevant content:
/etc/yum.repos.d/amzn-main.repo
[amzn-main] priority=10
The ansible yum repository module we use has a default of priority=99. [2]
priority=99
The net outcome is: yum will always select the vendor's repo (which contains v3.x), and never uses the repo added by this ansible role.
yum
[1] https://wiki.centos.org/PackageManagement/Yum/Priorities#head-6f52124e909c1691eb0c501ba38ae9202b66d6da [2] https://docs.ansible.com/ansible/2.5/modules/yum_repository_module.html
I've rebased these commits and updated the priority.
What's changing:
Set a priority when adding the yum repo that is a lower number (closer to
1
) than the CentOS/Amazon linux default. [1]Why:
On Amazon Linux 1, (and likely on CentOS) the vendor's repo, at
/etc/yum.repos.d/amzn-main.repo
has relevant content:The ansible yum repository module we use has a default of
priority=99
. [2]The net outcome is:
yum
will always select the vendor's repo (which contains v3.x), and never uses the repo added by this ansible role.[1] https://wiki.centos.org/PackageManagement/Yum/Priorities#head-6f52124e909c1691eb0c501ba38ae9202b66d6da [2] https://docs.ansible.com/ansible/2.5/modules/yum_repository_module.html