diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-02-20 19:57:44 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-02-20 20:13:30 +0100 |
commit | d64b0db2c48158f1be18d3dad47a3df7119b1444 (patch) | |
tree | 0dd6322b2022060952df7be80f85c261458b1b3b /roles | |
parent | e7cbe87fd35963666f8007b36a5168ffd84f6107 (diff) | |
download | openshift-d64b0db2c48158f1be18d3dad47a3df7119b1444.tar.gz openshift-d64b0db2c48158f1be18d3dad47a3df7119b1444.tar.bz2 openshift-d64b0db2c48158f1be18d3dad47a3df7119b1444.tar.xz openshift-d64b0db2c48158f1be18d3dad47a3df7119b1444.zip |
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 <gscrivan@redhat.com>
Diffstat (limited to 'roles')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 2 |
1 files changed, 1 insertions, 1 deletions
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]]) |