summaryrefslogtreecommitdiffstats
path: root/roles/openshift_docker/tasks
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-05-25 15:40:20 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-05-25 15:40:20 -0300
commitc45ccc0ee879e93a4fd4304b4848595fa27014c5 (patch)
tree09b97d9f46fad94693adbea4568035888cd4e764 /roles/openshift_docker/tasks
parent58f920e854180cd9a8754fee82712fa8dd7b1f34 (diff)
downloadopenshift-c45ccc0ee879e93a4fd4304b4848595fa27014c5.tar.gz
openshift-c45ccc0ee879e93a4fd4304b4848595fa27014c5.tar.bz2
openshift-c45ccc0ee879e93a4fd4304b4848595fa27014c5.tar.xz
openshift-c45ccc0ee879e93a4fd4304b4848595fa27014c5.zip
Convert generic openshift_version=3.2 to specific early in install.
Diffstat (limited to 'roles/openshift_docker/tasks')
-rw-r--r--roles/openshift_docker/tasks/main.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/openshift_docker/tasks/main.yml b/roles/openshift_docker/tasks/main.yml
index 2ab31de8b..1791d20c0 100644
--- a/roles/openshift_docker/tasks/main.yml
+++ b/roles/openshift_docker/tasks/main.yml
@@ -19,5 +19,17 @@
openshift_version: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0:2][1:] | join('-') if openshift.common.deployment_type == 'origin' else cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0][1:] }}"
when: is_containerized | bool and openshift_version is not defined
+# If we got an openshift_version like "3.2", lookup the latest 3.2 container version
+# and use that value instead.
+- name: Lookup specific OpenShift version if generic release specified
+ command: >
+ docker run --rm {{ openshift.common.cli_image }}:v{{ openshift_version }} version
+ register: cli_image_version
+ when: is_containerized | bool and openshift_version is defined and openshift_version.split('.') | length == 2
+
+- set_fact:
+ openshift_version: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0:2][1:] | join('-') if openshift.common.deployment_type == 'origin' else cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0][1:] }}"
+ when: is_containerized | bool and openshift_version is defined and openshift_version.split('.') | length == 2
+
- debug: var=openshift_version