summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks/openvswitch_system_container.yml
blob: 3254b35d618991589bf0f2deb42ad8eae3f9c7f2 (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
---
- set_fact:
    l_use_crio: "{{ openshift_docker_use_crio | default(false) }}"

- set_fact:
    l_service_name: "cri-o"
  when: l_use_crio

- set_fact:
    l_service_name: "{{ openshift.docker.service_name }}"
  when: not l_use_crio

- name: Pre-pull OpenVSwitch system container image
  command: >
    atomic pull --storage=ostree {{ openshift.common.system_images_registry }}/{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }}
  register: pull_result
  changed_when: "'Pulling layer' in pull_result.stdout"

- name: Install or Update OpenVSwitch system container
  oc_atomic_container:
    name: openvswitch
    image: "{{ openshift.common.system_images_registry }}/{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }}"
    state: latest
    values:
      - "DOCKER_SERVICE={{ l_service_name }}"