geerlingguy / ansible-role-varnish

Ansible Role - Varnish HTTP accelerator
https://galaxy.ansible.com/geerlingguy/varnish/
MIT License
80 stars 88 forks source link

fix default yum repo priority on AMZN Linux #80

Closed tamsky closed 6 years ago

tamsky commented 6 years ago

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:

[amzn-main]
priority=10

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

tamsky commented 6 years ago

I've rebased these commits and updated the priority.