diff --git a/test/integration/targets/setup_docker/aliases b/test/integration/targets/setup_docker/aliases new file mode 100644 index 0000000000..65e831523c --- /dev/null +++ b/test/integration/targets/setup_docker/aliases @@ -0,0 +1 @@ +needs/target/setup_epel diff --git a/test/integration/targets/setup_docker/tasks/RedHat.yml b/test/integration/targets/setup_docker/tasks/RedHat.yml index 40e7fa2892..f7802d13eb 100644 --- a/test/integration/targets/setup_docker/tasks/RedHat.yml +++ b/test/integration/targets/setup_docker/tasks/RedHat.yml @@ -12,8 +12,8 @@ - libseccomp - name: Install epel repo which is missing on rhel-7 and is needed for pigz (needed for docker-ce 18) - yum: - name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + include_role: + name: setup_epel - name: Enable extras repository for RHEL on AWS command: yum-config-manager --enable rhui-REGION-rhel-server-extras diff --git a/test/integration/targets/setup_epel/tasks/main.yml b/test/integration/targets/setup_epel/tasks/main.yml new file mode 100644 index 0000000000..664a8605a4 --- /dev/null +++ b/test/integration/targets/setup_epel/tasks/main.yml @@ -0,0 +1,3 @@ +- name: Install EPEL + yum: + name: https://s3.amazonaws.com/ansible-ci-files/test/integration/targets/setup_epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm diff --git a/test/integration/targets/setup_rpm_repo/aliases b/test/integration/targets/setup_rpm_repo/aliases new file mode 100644 index 0000000000..65e831523c --- /dev/null +++ b/test/integration/targets/setup_rpm_repo/aliases @@ -0,0 +1 @@ +needs/target/setup_epel diff --git a/test/integration/targets/setup_rpm_repo/tasks/main.yml b/test/integration/targets/setup_rpm_repo/tasks/main.yml index fa2c0bdb43..21805109af 100644 --- a/test/integration/targets/setup_rpm_repo/tasks/main.yml +++ b/test/integration/targets/setup_rpm_repo/tasks/main.yml @@ -1,7 +1,7 @@ - block: - name: Install epel repo which is missing on rhel-7 and is needed for rpmfluff - package: - name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + include_role: + name: setup_epel when: - ansible_distribution in ['RedHat'] - ansible_distribution_major_version is version('7', '==') diff --git a/test/integration/targets/ufw/aliases b/test/integration/targets/ufw/aliases index 03c559ec51..1d8e00af43 100644 --- a/test/integration/targets/ufw/aliases +++ b/test/integration/targets/ufw/aliases @@ -5,3 +5,4 @@ skip/rhel8.0 skip/docker needs/root destructive +needs/target/setup_epel diff --git a/test/integration/targets/ufw/tasks/main.yml b/test/integration/targets/ufw/tasks/main.yml index 21d3011021..f7975de933 100644 --- a/test/integration/targets/ufw/tasks/main.yml +++ b/test/integration/targets/ufw/tasks/main.yml @@ -1,9 +1,8 @@ --- # Make sure ufw is installed - name: Install EPEL repository (RHEL only) - yum: - name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm - state: present + include_role: + name: setup_epel when: ansible_distribution == 'RedHat' - name: Install iptables (SuSE only) package: