openvswitch_system_container.yml 956 B

123456789101112131415161718192021222324252627
  1. ---
  2. - set_fact:
  3. l_service_name: "cri-o"
  4. when: openshift_use_crio
  5. - set_fact:
  6. l_service_name: "{{ openshift_docker_service_name }}"
  7. when: not openshift_use_crio
  8. - name: Ensure proxies are in the atomic.conf
  9. include_role:
  10. name: openshift_atomic
  11. tasks_from: proxy
  12. - name: Pre-pull OpenVSwitch system container image
  13. command: >
  14. atomic pull --storage=ostree {{ 'docker:' if system_images_registry == 'docker' else system_images_registry + '/' }}{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }}
  15. register: pull_result
  16. changed_when: "'Pulling layer' in pull_result.stdout"
  17. - name: Install or Update OpenVSwitch system container
  18. oc_atomic_container:
  19. name: openvswitch
  20. image: "{{ 'docker:' if system_images_registry == 'docker' else system_images_registry + '/' }}{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }}"
  21. state: latest
  22. values:
  23. - "DOCKER_SERVICE={{ l_service_name }}"