From b1c57ea443ee9312336140f6231b20243ff47b04 Mon Sep 17 00:00:00 2001 From: berenddeschouwer Date: Fri, 13 Jan 2017 04:02:35 +0200 Subject: [PATCH] Installroot OS version check fix (#20180) Cast to int before checking the OS version. This prevents the DNF tests from running on Fedora < 23 --- test/integration/targets/dnf/tasks/main.yml | 4 ++-- test/integration/targets/yum/tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/targets/dnf/tasks/main.yml b/test/integration/targets/dnf/tasks/main.yml index 4a9addb573..43dbfba5bf 100644 --- a/test/integration/targets/dnf/tasks/main.yml +++ b/test/integration/targets/dnf/tasks/main.yml @@ -20,7 +20,7 @@ # We want to test that for people who don't want to upgrade their systems. - include: 'dnf.yml' - when: (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and False) or (ansible_distribution in ['Fedora'] and ansible_distribution_major_version >= 23) + when: (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and False) or (ansible_distribution in ['Fedora'] and ansible_distribution_major_version|int >= 23) - include: 'dnfinstallroot.yml' - when: (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and False) or (ansible_distribution in ['Fedora'] and ansible_distribution_major_version >= 23) + when: (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and False) or (ansible_distribution in ['Fedora'] and ansible_distribution_major_version|int >= 23) diff --git a/test/integration/targets/yum/tasks/main.yml b/test/integration/targets/yum/tasks/main.yml index 5670171d5c..78077796e8 100644 --- a/test/integration/targets/yum/tasks/main.yml +++ b/test/integration/targets/yum/tasks/main.yml @@ -28,5 +28,5 @@ # It will always run with $releasever unset - include: 'yuminstallroot.yml' when: (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] or - (ansible_distribution in ['Fedora'] and ansible_distribution_major_version < 23)) and + (ansible_distribution in ['Fedora'] and ansible_distribution_major_version|int < 23)) and ansible_python.version.major == 2