From c45ccc0ee879e93a4fd4304b4848595fa27014c5 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Wed, 25 May 2016 15:40:20 -0300 Subject: Convert generic openshift_version=3.2 to specific early in install. --- roles/openshift_docker/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'roles/openshift_docker/tasks') 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 -- cgit v1.2.3