diff options
author | Russell Teague <rteague@redhat.com> | 2017-06-29 15:26:38 -0400 |
---|---|---|
committer | Russell Teague <rteague@redhat.com> | 2017-06-29 15:29:02 -0400 |
commit | 6d4c84b272f11dfd98956a0725a795eacd599a60 (patch) | |
tree | 440ea87cab73e2eacc94168ae2838511d4cfe45c /roles/openshift_facts/library | |
parent | 2c03eec969aa3f897d8b963628cc7bf7c1caa601 (diff) | |
download | openshift-6d4c84b272f11dfd98956a0725a795eacd599a60.tar.gz openshift-6d4c84b272f11dfd98956a0725a795eacd599a60.tar.bz2 openshift-6d4c84b272f11dfd98956a0725a795eacd599a60.tar.xz openshift-6d4c84b272f11dfd98956a0725a795eacd599a60.zip |
Correct version comparisons to ensure proper evaluation
When a user supplies the openshift_image_tag inventory fact as '3.5',
the evaluation of `version >= LooseVersion('3.5.0')` will return False.
Changing the evaluation against only the X.X release will properly
return True.
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 663423061..cc2a1d2eb 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -912,17 +912,17 @@ def set_version_facts_if_unset(facts): version_gte_3_1_1_or_1_1_1 = version >= LooseVersion('1.1.1') version_gte_3_2_or_1_2 = version >= LooseVersion('1.2.0') version_gte_3_3_or_1_3 = version >= LooseVersion('1.3.0') - version_gte_3_4_or_1_4 = version >= LooseVersion('1.4.0') - version_gte_3_5_or_1_5 = version >= LooseVersion('1.5.0') - version_gte_3_6 = version >= LooseVersion('3.6.0') + version_gte_3_4_or_1_4 = version >= LooseVersion('1.4') + version_gte_3_5_or_1_5 = version >= LooseVersion('1.5') + version_gte_3_6 = version >= LooseVersion('3.6') else: version_gte_3_1_or_1_1 = version >= LooseVersion('3.0.2.905') version_gte_3_1_1_or_1_1_1 = version >= LooseVersion('3.1.1') version_gte_3_2_or_1_2 = version >= LooseVersion('3.1.1.901') version_gte_3_3_or_1_3 = version >= LooseVersion('3.3.0') - version_gte_3_4_or_1_4 = version >= LooseVersion('3.4.0') - version_gte_3_5_or_1_5 = version >= LooseVersion('3.5.0') - version_gte_3_6 = version >= LooseVersion('3.6.0') + version_gte_3_4_or_1_4 = version >= LooseVersion('3.4') + version_gte_3_5_or_1_5 = version >= LooseVersion('3.5') + version_gte_3_6 = version >= LooseVersion('3.6') else: # 'Latest' version is set to True, 'Next' versions set to False version_gte_3_1_or_1_1 = True |