summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-01-04 14:40:34 -0800
committerMatt Clay <matt@mystile.com>2023-01-04 17:53:03 -0800
commit3b9775d290a94d3fe9189476bbe438c54416a11d (patch)
tree491d4f23a4595acd79fa083303b58dbbe4cb2081
parentc37870a7355d839e33bbe8e7839a9663fb922c75 (diff)
downloadansible-3b9775d290a94d3fe9189476bbe438c54416a11d.tar.gz
[stable-2.12] Fix EPEL setup for integration tests on RHEL 7
(cherry picked from commit 1243d2ace0aa6dc609369dafee7ad52cf9aa26ef) Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r--test/integration/targets/setup_epel/tasks/main.yml5
-rw-r--r--test/integration/targets/yum/tasks/yuminstallroot.yml9
2 files changed, 5 insertions, 9 deletions
diff --git a/test/integration/targets/setup_epel/tasks/main.yml b/test/integration/targets/setup_epel/tasks/main.yml
index 1c41e13e02..23788b2405 100644
--- a/test/integration/targets/setup_epel/tasks/main.yml
+++ b/test/integration/targets/setup_epel/tasks/main.yml
@@ -1,3 +1,8 @@
+- name: Enable RHEL7 extras
+ # EPEL 7 depends on RHEL 7 extras, which is not enabled by default on RHEL.
+ # See: https://docs.fedoraproject.org/en-US/epel/epel-policy/#_policy
+ command: yum-config-manager --enable rhel-7-server-rhui-extras-rpms
+ when: ansible_facts.distribution == 'RedHat' and ansible_facts.distribution_major_version == '7'
- name: Install EPEL
yum:
name: https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/setup_epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
diff --git a/test/integration/targets/yum/tasks/yuminstallroot.yml b/test/integration/targets/yum/tasks/yuminstallroot.yml
index f9bee6f9ae..162c3b2fd5 100644
--- a/test/integration/targets/yum/tasks/yuminstallroot.yml
+++ b/test/integration/targets/yum/tasks/yuminstallroot.yml
@@ -76,13 +76,6 @@
- ansible_facts["distribution_major_version"] == "7"
- ansible_facts["distribution"] == "RedHat"
block:
- # Need to enable this RHUI repo for RHEL7 testing in AWS, CentOS has Extras
- # enabled by default and this is not needed there.
- - name: enable rhel-7-server-rhui-extras-rpms repo for RHEL7
- command: yum-config-manager --enable rhel-7-server-rhui-extras-rpms
- - name: update cache to pull repodata
- yum:
- update_cache: yes
- name: install required packages for buildah test
yum:
state: present
@@ -118,5 +111,3 @@
state: absent
name:
- buildah
- - name: disable rhel-7-server-rhui-extras-rpms repo for RHEL7
- command: yum-config-manager --disable rhel-7-server-rhui-extras-rpms