summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cli/templates
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-06-10 10:47:11 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-06-10 10:47:11 -0300
commitdb711081e6c1b2b676c212b0eeba95da9cb9f2c5 (patch)
treef7bb220893b9e76b4d6797e441ed50bf23d51166 /roles/openshift_cli/templates
parent755a48c4ebf1061ce19892e5378fba769027bfc1 (diff)
parentfea08b9ba213b69667e103ff9dfd4383218e9eac (diff)
downloadopenshift-db711081e6c1b2b676c212b0eeba95da9cb9f2c5.tar.gz
openshift-db711081e6c1b2b676c212b0eeba95da9cb9f2c5.tar.bz2
openshift-db711081e6c1b2b676c212b0eeba95da9cb9f2c5.tar.xz
openshift-db711081e6c1b2b676c212b0eeba95da9cb9f2c5.zip
Merge branch 'master' into upgrade33
Diffstat (limited to 'roles/openshift_cli/templates')
-rw-r--r--roles/openshift_cli/templates/openshift.j28
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/openshift_cli/templates/openshift.j2 b/roles/openshift_cli/templates/openshift.j2
index 501796b0b..1c82e02a2 100644
--- a/roles/openshift_cli/templates/openshift.j2
+++ b/roles/openshift_cli/templates/openshift.j2
@@ -5,7 +5,7 @@ fi
cmd=`basename $0`
user=`id -u`
group=`id -g`
-image_tag=v{{ openshift_version }}
+image_tag="v{{ openshift_version }}"
>&2 echo """
================================================================================
@@ -21,4 +21,8 @@ See https://docs.openshift.org/latest/cli_reference/get_started_cli.html
=================================================================================
"""
-docker run -i --privileged --net=host --user=${user}:${group} -v ~/.kube:/root/.kube -v /tmp:/tmp -v {{ openshift.common.config_base}}:{{ openshift.common.config_base }} -e KUBECONFIG=/root/.kube/config --entrypoint ${cmd} --rm {{ openshift.common.cli_image }}:${image_tag} "${@}"
+if [ -n "$image_tag" ]; then
+ image_tag=":$image_tag"
+fi
+
+docker run -i --privileged --net=host --user=${user}:${group} -v ~/.kube:/root/.kube -v /tmp:/tmp -v {{ openshift.common.config_base}}:{{ openshift.common.config_base }} -e KUBECONFIG=/root/.kube/config --entrypoint ${cmd} --rm {{ openshift.common.cli_image }}${image_tag} "${@}"