From d64b0db2c48158f1be18d3dad47a3df7119b1444 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 20 Feb 2017 19:57:44 +0100 Subject: openshift_facts: handle 'latest' version do not attempt to compare the version using LooseVersion when 'latest' is used. The case openshift_version == None already sets to use the last version, so simply reuse that. Signed-off-by: Giuseppe Scrivano --- roles/openshift_facts/library/openshift_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index ef7f159c5..2503d6212 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -864,7 +864,7 @@ def set_version_facts_if_unset(facts): if 'common' in facts: deployment_type = facts['common']['deployment_type'] openshift_version = get_openshift_version(facts) - if openshift_version: + if openshift_version and openshift_version != "latest": version = LooseVersion(openshift_version) facts['common']['version'] = openshift_version facts['common']['short_version'] = '.'.join([str(x) for x in version.version[0:2]]) -- cgit v1.2.3