diff options
Diffstat (limited to 'roles/openshift_docker_facts/tasks/main.yml')
-rw-r--r-- | roles/openshift_docker_facts/tasks/main.yml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/roles/openshift_docker_facts/tasks/main.yml b/roles/openshift_docker_facts/tasks/main.yml new file mode 100644 index 000000000..cdea90413 --- /dev/null +++ b/roles/openshift_docker_facts/tasks/main.yml @@ -0,0 +1,59 @@ +--- +- 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) }}" + docker_http_proxy: "{{ openshift.common.http_proxy | default(omit) }}" + docker_https_proxy: "{{ openshift.common.https_proxy | default(omit) }}" + docker_no_proxy: "{{ openshift.common.no_proxy | 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 and openshift.docker.hosted_registry_network is defined + +- 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 + |