summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2017-02-01 14:32:43 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-02-04 10:19:41 +0100
commit997763aa73ecf712ce9f62427309a12e89db3c51 (patch)
treec552a19af5f2920c73b91f60f40bd4dba828b93a
parentec0983dc4bc96573e3f7f958aea7040c15c1db81 (diff)
downloadopenshift-997763aa73ecf712ce9f62427309a12e89db3c51.tar.gz
openshift-997763aa73ecf712ce9f62427309a12e89db3c51.tar.bz2
openshift-997763aa73ecf712ce9f62427309a12e89db3c51.tar.xz
openshift-997763aa73ecf712ce9f62427309a12e89db3c51.zip
Support latest for containerized version
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-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