]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commit
common: use ansible_distribution_major_version in epel repos 729/head
authorKen Dreyer <kdreyer@redhat.com>
Mon, 17 Apr 2023 19:28:22 +0000 (15:28 -0400)
committerKen Dreyer <kdreyer@redhat.com>
Mon, 17 Apr 2023 19:28:22 +0000 (15:28 -0400)
commitb911af839d08754ce8c963199140119d39ce0110
tree5fc12420c2e0e6856c952ed2c6297d4653db0e6e
parentd8ed5da66dd21d5e7ce2e8a527fa4ace8da419a2
common: use ansible_distribution_major_version in epel repos

RHEL systems use roles/common/tasks/rhel-entitlements.yml, and this sets
Yum's $releasever to a specific RHEL minor release (eg. 8.4 or 8.6). As
a result. Fedora's MirrorManager does not return any EPEL repositories
for these minor RHEL versions.

We set a static $releasever in rhel-entitlements.yml so that we pin to
old RHEL RPM content in our old RHEL nodes. We probably need to re-think
this strategy since our CentOS Stream nodes do not (cannot) do this, and
Red Hat does not really support pinning to old versions without an EUS
subscription.

Rather than untangling all that and removing our $releasever
manipulation altogether, this commit simply hard-codes
ansible_distribution_major_version ("8", "9", etc) into the EPEL .repo
files, ignoring $releasever for EPEL.

A longer-term fix would be to stop mangling $releasever on RHEL.
roles/common/defaults/main.yml