From cf0ccf34897ae6b0597a8c2508417b3849b46652 Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Sun, 16 Aug 2020 15:09:56 -0500 Subject: [PATCH] Use ansible version to perform the version compare --- tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 6c806a6..fe6bd3a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -32,7 +32,7 @@ when: - ansible_system == 'Linux' - ansible_distribution == 'Fedora' - - ansible_distribution_major_version >= 21 + - ansible_distribution_major_version is version('21', '>=') package: name: - 'dnf-automatic' @@ -44,7 +44,7 @@ when: - ansible_system == 'Linux' - ansible_distribution == 'Fedora' - - ansible_distribution_major_version >= 21 + - ansible_distribution_major_version is version('21', '>=') service: enabled: 'yes' name: 'dnf-automatic-install.timer'