summaryrefslogtreecommitdiffstats
path: root/roles/docker/tasks/main.yml
blob: 5ea73568a82d0627c902e9f319022503c481893f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
# These tasks dispatch to the proper set of docker tasks based on the
# inventory:openshift_docker_use_system_container variable

- include: udev_workaround.yml
  when: docker_udev_workaround | default(False) | bool

- set_fact:
    l_use_system_container: "{{ openshift.docker.use_system_container | default(False) }}"
    l_use_crio: "{{ openshift_use_crio | default(False) }}"
    l_use_crio_only: "{{ openshift_use_crio_only | default(False) }}"

- name: Add enterprise registry, if necessary
  set_fact:
    l2_docker_additional_registries: "{{ l2_docker_additional_registries + [openshift_docker_ent_reg] }}"
  when:
    - openshift.common.deployment_type == 'openshift-enterprise'
    - openshift_docker_ent_reg != ''
    - openshift_docker_ent_reg not in l2_docker_additional_registries
    - not l_use_crio_only

- name: Use Package Docker if Requested
  include: package_docker.yml
  when:
    - not l_use_system_container
    - not l_use_crio_only

- name: Use System Container Docker if Requested
  include: systemcontainer_docker.yml
  when:
    - l_use_system_container
    - not l_use_crio_only

- name: Add CRI-O usage Requested
  include: systemcontainer_crio.yml
  when:
    - l_use_crio
    - inventory_hostname in groups['oo_masters_to_config'] or inventory_hostname in groups['oo_nodes_to_config']