diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-05-25 09:20:15 -0300 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-05-25 10:29:18 -0300 |
commit | 717012aa4d5df01e5859ce44705abfbf34be8047 (patch) | |
tree | 19bb9ebbd4b0045bac07fdd60cf37a99693bf1bf /roles/openshift_facts/library | |
parent | 5c833d9f29e292d11c0cbf08786e9015f133ce17 (diff) | |
download | openshift-717012aa4d5df01e5859ce44705abfbf34be8047.tar.gz openshift-717012aa4d5df01e5859ce44705abfbf34be8047.tar.bz2 openshift-717012aa4d5df01e5859ce44705abfbf34be8047.tar.xz openshift-717012aa4d5df01e5859ce44705abfbf34be8047.zip |
Hookup node configuration.
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 33596cd3e..eee4d2b8e 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -826,7 +826,7 @@ def set_version_facts_if_unset(facts): if 'common' in facts: deployment_type = facts['common']['deployment_type'] version = get_openshift_version(facts) - if version is not None: + if version: facts['common']['version'] = version if deployment_type == 'origin': version_gte_3_1_or_1_1 = LooseVersion(version) >= LooseVersion('1.1.0') @@ -1150,7 +1150,11 @@ def parse_openshift_version(output): string: the version number """ versions = dict(e.split(' v') for e in output.splitlines() if ' v' in e) - return versions.get('openshift', '') + ver = versions.get('openshift', '') + # Remove trailing build number and commit hash from older versions, we need to return a straight + # w.x.y.z version here for use as openshift_version throughout the playbooks/roles. (i.e. 3.1.1.6-64-g80b61da) + ver = ver.split('-')[0] + return ver def apply_provider_facts(facts, provider_facts): |