summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/dnf/tasks/main.yml
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2024-05-07 08:42:55 +0200
committerGitHub <noreply@github.com>2024-05-07 08:42:55 +0200
commit523745e02e3fcdcfe86e245ff8b9d5fdce2eeb97 (patch)
treea4a74a7c133e692a764af50bf0d24704efbeea9e /test/integration/targets/dnf/tasks/main.yml
parentpackage_facts: apk fix when cache is empty (#83132) (diff)
downloadansible-523745e02e3fcdcfe86e245ff8b9d5fdce2eeb97.tar.xz
ansible-523745e02e3fcdcfe86e245ff8b9d5fdce2eeb97.zip
dnf: integration tests cleanup (#83203)
* remove no longer needed tasks * remove workarounds * consolidate conditionals * remove distros/versions from conditionals that are no longer present in CI
Diffstat (limited to 'test/integration/targets/dnf/tasks/main.yml')
-rw-r--r--test/integration/targets/dnf/tasks/main.yml70
1 files changed, 17 insertions, 53 deletions
diff --git a/test/integration/targets/dnf/tasks/main.yml b/test/integration/targets/dnf/tasks/main.yml
index 8d9bda4742..9f43d1df24 100644
--- a/test/integration/targets/dnf/tasks/main.yml
+++ b/test/integration/targets/dnf/tasks/main.yml
@@ -16,55 +16,28 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
-# Note: We install the yum package onto Fedora so that this will work on dnf systems
-# We want to test that for people who don't want to upgrade their systems.
-
-- include_tasks: dnf.yml
- when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or
- (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))
-
-- include_tasks: skip_broken_and_nobest.yml
- when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or
- (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))
-
-- include_tasks: filters_check_mode.yml
- when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or
- (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))
- tags:
- - filters
-
-- include_tasks: filters.yml
- when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or
- (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))
- tags:
- - filters
-
-- include_tasks: gpg.yml
- when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or
- (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 in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))
-
-- include_tasks: dnf_group_remove.yml
- when:
- - (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or
- (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 in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))
+- block:
+ - include_tasks: dnf.yml
+ - include_tasks: skip_broken_and_nobest.yml
+ - block:
+ - include_tasks: filters.yml
+ - include_tasks: filters_check_mode.yml
+ tags:
+ - filters
+ - include_tasks: gpg.yml
+ - include_tasks: repo.yml
+ - include_tasks: dnf_group_remove.yml
+ - include_tasks: dnfinstallroot.yml
+ - include_tasks: logging.yml
+ - include_tasks: cacheonly.yml
+ when: ansible_distribution in ['Fedora', 'RedHat']
# Attempting to install a different RHEL release in a tmpdir doesn't work (rhel8 beta)
- include_tasks: dnfreleasever.yml
- when:
- - ansible_distribution == 'Fedora'
- - ansible_distribution_major_version is version('23', '>=')
+ when: ansible_distribution == 'Fedora'
- when:
- - (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('39', '<')) or
- (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))
+ - ansible_distribution == 'RedHat'
- not dnf5|default(false)
block:
# FUTURE - look at including AppStream support in our local repo
@@ -86,12 +59,3 @@
rescue:
# Just in case something crazy happens when listing or parsing modules
- meta: noop
-
-- include_tasks: logging.yml
- when: (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('31', '>=')) or
- (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))
-
-- include_tasks: cacheonly.yml
- when:
- - (ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('23', '>=')) or
- (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('8', '>='))