diff --git a/test/integration/targets/dnf/tasks/dnfinstallroot.yml b/test/integration/targets/dnf/tasks/dnfinstallroot.yml index 25ec80a727b..b5e0901166e 100644 --- a/test/integration/targets/dnf/tasks/dnfinstallroot.yml +++ b/test/integration/targets/dnf/tasks/dnfinstallroot.yml @@ -11,7 +11,8 @@ - name: Populate directory copy: - content: "{{ ansible_distribution_version }}\n" + # We need '8' for CentOS, but '8.x' for RHEL. + content: "{{ ansible_distribution_version|int if ansible_distribution != 'RedHat' else ansible_distribution_version }}\n" dest: "/{{ dnfroot.stdout }}/etc/dnf/vars/releasever" # This will drag in > 200 MB. diff --git a/test/integration/targets/dnf/tasks/main.yml b/test/integration/targets/dnf/tasks/main.yml index 1135509f94d..9369b5b0cd4 100644 --- a/test/integration/targets/dnf/tasks/main.yml +++ b/test/integration/targets/dnf/tasks/main.yml @@ -21,15 +21,15 @@ - include_tasks: dnf.yml when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or - (ansible_distribution == 'RedHat' and ansible_distribution_major_version is version('8', '>=')) + (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>=')) - include_tasks: repo.yml when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or - (ansible_distribution == 'RedHat' and ansible_distribution_major_version is version('8', '>=')) + (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>=')) - include_tasks: dnfinstallroot.yml when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or - (ansible_distribution == 'RedHat' and ansible_distribution_major_version is version('8', '>=')) + (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>=')) # Attempting to install a different RHEL release in a tmpdir doesn't work (rhel8 beta) - include_tasks: dnfreleasever.yml @@ -39,4 +39,4 @@ - include_tasks: modularity.yml when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('29', '>=')) or - (ansible_distribution == 'RedHat' and ansible_distribution_major_version is version('8', '>=')) + (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>=')) diff --git a/test/integration/targets/dnf/vars/CentOS.yml b/test/integration/targets/dnf/vars/CentOS.yml new file mode 100644 index 00000000000..c70d8538d81 --- /dev/null +++ b/test/integration/targets/dnf/vars/CentOS.yml @@ -0,0 +1,2 @@ +astream_name: '@php:7.2/minimal' +astream_name_no_stream: '@php/minimal'