Browse Source

Stop downgrading Docker because we don't know what version to install yet.

Devan Goodwin 8 years ago
parent
commit
436c287335

+ 1 - 1
playbooks/common/openshift-master/config.yml

@@ -376,7 +376,7 @@
                                                     | union(groups['oo_etcd_to_config'] | default([])))
                                                 | oo_collect('openshift.common.hostname') | default([]) | join (',')
                                                 }}"
-                                                #openshift_version: "{{ g_openshift_version_requested }}"
+    openshift_version: "{{ g_openshift_version_requested }}"
     when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and
             openshift_generate_no_proxy_hosts | default(True) | bool }}"
   pre_tasks:

+ 10 - 4
roles/openshift_docker_facts/tasks/main.yml

@@ -49,6 +49,8 @@
   changed_when: false
   when: not openshift.common.is_containerized | bool
 
+- debug: var=openshift_version
+
 - set_fact:
     l_common_version: "{{ openshift_version | default('0.0', True) | oo_image_tag_to_rpm_version }}"
   when: openshift.common.is_containerized | bool
@@ -59,16 +61,20 @@
 
 - debug: var=l_common_version
 
+# TODO: hardcoding specific docker versions here is not going to be maintainable...
+# Don't define a docker version if we don't yet know what version we're going to install.
 - name: Set docker version to be installed
   set_fact:
     docker_version: "{{ '1.8.2' }}"
-  when: " ( l_common_version | version_compare('3.2','<') and openshift.common.service_type in ['openshift', 'atomic-openshift'] ) or
-          ( l_common_version | version_compare('1.1.4','<') and openshift.common.service_type == 'origin' )"
+  when: " l_common_version != '0.0' and
+          (( l_common_version | version_compare('3.2','<') and openshift.common.service_type in ['openshift', 'atomic-openshift'] ) or
+          ( l_common_version | version_compare('1.1.4','<') and openshift.common.service_type == 'origin' ))"
 
 - name: Set docker version to be installed
   set_fact:
     docker_version: "{{ '1.9.1' }}"
-  when: " ( l_common_version | version_compare('3.2','>') and openshift.common.service_type == 'atomic-openshift' ) or
-          ( l_common_version | version_compare('1.2','>') and openshift.common.service_type == 'origin' )"
+  when: " l_common_version != '0.0' and
+          (( l_common_version | version_compare('3.2','>') and openshift.common.service_type == 'atomic-openshift' ) or
+          ( l_common_version | version_compare('1.2','>') and openshift.common.service_type == 'origin' ))"
 
 - debug: var=docker_version