From 01c72cf58c1fa1fb647ea0d3117e940ebf79a4ed Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 25 Oct 2018 14:36:47 +0100 Subject: [PATCH] SUSE: Fix version compare for OBS containers repository Right now the OBS:Virtualization:containers repository is added to Leap 15 because the version comparison does not quite work. We need to use the 'version' test to properly compare distribution versions. Change-Id: Ib2b8e8b41ad34daf387d2bfb0c7308c271570f21 --- vars/suse-host.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/suse-host.yml b/vars/suse-host.yml index fd956197..6e4a7987 100644 --- a/vars/suse-host.yml +++ b/vars/suse-host.yml @@ -20,7 +20,7 @@ lxc_hosts_external_repo: # NOTE(hwoarang) Leap 15.X is newer than 42.X and it has all the necessary LXC packages so we don't need # to use the OBS repository. As such we only add it if version is >= 42 so we can capture all the old Leap # releases. Using the external repo can be removed once we drop support for 42.X - state: "{{ (ansible_distribution_major_version >= 42) | ternary ('present', 'absent') }}" + state: "{{ (ansible_distribution_version is version ('42.1', '>=')) | ternary ('present', 'absent') }}" system_config_dir: "/etc/sysconfig" systemd_utils_prefix: "/usr/lib/systemd"