summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-02-06 11:10:14 -0500
committerGitHub <noreply@github.com>2017-02-06 11:10:14 -0500
commitad5acf5d137721b4affc3d826569d42c5b87f8f3 (patch)
tree83e8f431aaa4df4d6203921ca6d2ca6d97b837d9 /roles/openshift_facts
parenta965c28ab7ca6ac93c70e4a2415316ddaf52812e (diff)
parent997763aa73ecf712ce9f62427309a12e89db3c51 (diff)
downloadopenshift-ad5acf5d137721b4affc3d826569d42c5b87f8f3.tar.gz
openshift-ad5acf5d137721b4affc3d826569d42c5b87f8f3.tar.bz2
openshift-ad5acf5d137721b4affc3d826569d42c5b87f8f3.tar.xz
openshift-ad5acf5d137721b4affc3d826569d42c5b87f8f3.zip
Merge pull request #3262 from giuseppe/fix-latest
Support latest for containerized version
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index e72ab26fc..ec2942b69 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1382,7 +1382,8 @@ def get_container_openshift_version(facts):
tag = line[len("IMAGE_VERSION="):].strip()
# Remove leading "v" and any trailing release info, we just want
# a version number here:
- version = tag[1:].split("-")[0]
+ no_v_version = tag[1:] if tag[0] == 'v' else tag
+ version = no_v_version.split("-")[0]
return version
return None