node_system_container.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ---
  2. - name: Pre-pull node system container image
  3. command: >
  4. atomic pull --storage=ostree {{ 'docker:' if system_images_registry == 'docker' else system_images_registry + '/' }}{{ osn_image }}:{{ openshift_image_tag }}
  5. register: pull_result
  6. changed_when: "'Pulling layer' in pull_result.stdout"
  7. - name: Install or Update node system container
  8. oc_atomic_container:
  9. name: "{{ openshift_service_type }}-node"
  10. image: "{{ 'docker:' if system_images_registry == 'docker' else system_images_registry + '/' }}{{ osn_image }}:{{ openshift_image_tag }}"
  11. values:
  12. - "DNS_DOMAIN={{ openshift.common.dns_domain }}"
  13. - "DOCKER_SERVICE={{ openshift_docker_service_name }}.service"
  14. - "MASTER_SERVICE={{ openshift_service_type }}.service"
  15. - 'ADDTL_MOUNTS={{ l_node_syscon_add_mounts2 }}'
  16. state: latest
  17. vars:
  18. # We need to evaluate some variables here to ensure
  19. # l_bind_docker_reg_auth is evaluated after registry_auth.yml has been
  20. # processed.
  21. # Determine if we want to include auth credentials mount.
  22. l_node_syscon_auth_mounts_l: "{{ l_bind_docker_reg_auth | ternary(openshift_node_syscon_auth_mounts_l,[]) }}"
  23. # Join any user-provided mounts and auth_mounts into a combined list.
  24. l_node_syscon_add_mounts_l: "{{ openshift_node_syscon_add_mounts_l | union(l_node_syscon_auth_mounts_l) }}"
  25. # We must prepend a ',' here to ensure the value is inserted properly into an
  26. # existing json list in the container's config.json
  27. # lib_utils_oo_l_of_d_to_csv is a custom filter plugin in roles/lib_utils/oo_filters.py
  28. l_node_syscon_add_mounts: ",{{ l_node_syscon_add_mounts_l | lib_utils_oo_l_of_d_to_csv }}"
  29. # if we have just a ',' then both mount lists were empty, we don't want to add
  30. # anything to config.json
  31. l_node_syscon_add_mounts2: "{{ (l_node_syscon_add_mounts != ',') | bool | ternary(l_node_syscon_add_mounts,'') }}"