123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- ---
- - name: Set docker facts
- openshift_facts:
- role: "{{ item.role }}"
- local_facts: "{{ item.local_facts }}"
- with_items:
- - role: docker
- local_facts:
- additional_registries: "{{ openshift_docker_additional_registries | default(None) }}"
- blocked_registries: "{{ openshift_docker_blocked_registries | default(None) }}"
- insecure_registries: "{{ openshift_docker_insecure_registries | default(None) }}"
- log_driver: "{{ openshift_docker_log_driver | default(None) }}"
- log_options: "{{ openshift_docker_log_options | default(None) }}"
- options: "{{ openshift_docker_options | default(None) }}"
- disable_push_dockerhub: "{{ openshift_disable_push_dockerhub | default(None) }}"
- hosted_registry_insecure: "{{ openshift_docker_hosted_registry_insecure | default(None) }}"
- hosted_registry_network: "{{ openshift_docker_hosted_registry_network | default(None) }}"
- - set_fact:
- docker_additional_registries: "{{ openshift.docker.additional_registries
- | default(omit) }}"
- docker_blocked_registries: "{{ openshift.docker.blocked_registries
- | default(omit) }}"
- docker_insecure_registries: "{{ openshift.docker.insecure_registries
- | default(omit) }}"
- docker_log_driver: "{{ openshift.docker.log_driver | default(omit) }}"
- docker_log_options: "{{ openshift.docker.log_options | default(omit) }}"
- docker_push_dockerhub: "{{ openshift.docker.disable_push_dockerhub
- | default(omit) }}"
- - set_fact:
- docker_options: >
- --insecure-registry={{ openshift.docker.hosted_registry_network }}
- {{ openshift.docker.options | default ('') }}
- when: openshift.docker.hosted_registry_insecure | default(False) | bool
- - set_fact:
- docker_options: "{{ openshift.docker.options | default(omit) }}"
- when: not openshift.docker.hosted_registry_insecure | default(False) | bool
- # Avoid docker 1.9 when installing origin < 1.2 or OSE < 3.2 on RHEL/Centos and
- # See: https://bugzilla.redhat.com/show_bug.cgi?id=1304038
- - name: Gather common package version
- command: >
- {{ repoquery_cmd }} --qf '%{version}' "{{ openshift.common.service_type}}"
- register: common_version
- failed_when: false
- changed_when: false
- when: not openshift.common.is_containerized | bool
- - set_fact:
- l_common_version: "{{ openshift_version | default('0.0', True) | oo_image_tag_to_rpm_version }}"
- when: openshift.common.is_containerized | bool
- - set_fact:
- l_common_version: "{{ common_version.stdout | default('0.0', True) }}"
- when: not openshift.common.is_containerized | bool
- - 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 == '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' )"
|