main.yml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. ---
  2. docker_cli_auth_config_path: '/root/.docker'
  3. openshift_docker_signature_verification: False
  4. repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}"
  5. openshift_docker_alternative_creds: False
  6. # oreg_url is defined by user input.
  7. oreg_host: "{{ oreg_url.split('/')[0] if (oreg_url is defined and '.' in oreg_url.split('/')[0]) else '' }}"
  8. oreg_auth_credentials_replace: False
  9. openshift_docker_use_system_container: False
  10. openshift_docker_disable_push_dockerhub: False # bool
  11. openshift_docker_selinux_enabled: True
  12. openshift_docker_service_name: "{{ 'container-engine' if (openshift_docker_use_system_container | default(False)) else 'docker' }}"
  13. openshift_docker_hosted_registry_insecure: False # bool
  14. openshift_docker_hosted_registry_network_default: "{{ openshift_portal_net | default(False) }}"
  15. openshift_docker_hosted_registry_network: "{{ openshift_docker_hosted_registry_network_default }}"
  16. openshift_docker_additional_registries: []
  17. openshift_docker_blocked_registries: []
  18. openshift_docker_insecure_registries: []
  19. openshift_docker_ent_reg: 'registry.access.redhat.com'
  20. openshift_docker_options: False # str
  21. openshift_docker_log_driver: False # str
  22. openshift_docker_log_options: []
  23. # The l2_docker_* variables convert csv strings to lists, if
  24. # necessary. These variables should be used in place of their respective
  25. # openshift_docker_* counterparts to ensure the properly formatted lists are
  26. # utilized.
  27. l2_docker_additional_registries: "{% if openshift_docker_additional_registries is string %}{% if openshift_docker_additional_registries == '' %}[]{% elif ',' in openshift_docker_additional_registries %}{{ openshift_docker_additional_registries.split(',') | list }}{% else %}{{ [ openshift_docker_additional_registries ] }}{% endif %}{% else %}{{ openshift_docker_additional_registries }}{% endif %}"
  28. l2_docker_blocked_registries: "{% if openshift_docker_blocked_registries is string %}{% if openshift_docker_blocked_registries == '' %}[]{% elif ',' in openshift_docker_blocked_registries %}{{ openshift_docker_blocked_registries.split(',') | list }}{% else %}{{ [ openshift_docker_blocked_registries ] }}{% endif %}{% else %}{{ openshift_docker_blocked_registries }}{% endif %}"
  29. l2_docker_insecure_registries: "{% if openshift_docker_insecure_registries is string %}{% if openshift_docker_insecure_registries == '' %}[]{% elif ',' in openshift_docker_insecure_registries %}{{ openshift_docker_insecure_registries.split(',') | list }}{% else %}{{ [ openshift_docker_insecure_registries ] }}{% endif %}{% else %}{{ openshift_docker_insecure_registries }}{% endif %}"
  30. l2_docker_log_options: "{% if openshift_docker_log_options is string %}{% if ',' in openshift_docker_log_options %}{{ openshift_docker_log_options.split(',') | list }}{% else %}{{ [ openshift_docker_log_options ] }}{% endif %}{% else %}{{ openshift_docker_log_options }}{% endif %}"
  31. openshift_docker_use_etc_containers: False
  32. containers_registries_conf_path: /etc/containers/registries.conf
  33. r_crio_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
  34. r_crio_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
  35. r_crio_os_firewall_deny: []
  36. r_crio_os_firewall_allow:
  37. - service: crio
  38. port: 10010/tcp
  39. openshift_docker_is_node_or_master: "{{ True if inventory_hostname in (groups['oo_masters_to_config']|default([])) or inventory_hostname in (groups['oo_nodes_to_config']|default([])) else False | bool }}"
  40. docker_alt_storage_path: /var/lib/containers/docker
  41. docker_default_storage_path: /var/lib/docker
  42. # Set local versions of facts that must be in json format for container-daemon.json
  43. # NOTE: When jinja2.9+ is used the container-daemon.json file can move to using tojson
  44. l_docker_log_options: "{{ l2_docker_log_options | to_json }}"
  45. l_docker_log_options_dict: "{{ l2_docker_log_options | lib_utils_oo_list_to_dict | to_json }}"
  46. l_docker_additional_registries: "{{ l2_docker_additional_registries | to_json }}"
  47. l_docker_blocked_registries: "{{ l2_docker_blocked_registries | to_json }}"
  48. l_docker_insecure_registries: "{{ l2_docker_insecure_registries | to_json }}"
  49. l_docker_selinux_enabled: "{{ openshift_docker_selinux_enabled | to_json }}"
  50. docker_http_proxy: "{{ openshift_http_proxy | default('') }}"
  51. docker_https_proxy: "{{ openshift.common.https_proxy | default('') }}"
  52. docker_no_proxy: "{{ openshift.common.no_proxy | default('') }}"
  53. openshift_use_crio: False
  54. openshift_use_crio_only: False
  55. l_openshift_image_tag_default: "{{ openshift_release | default('latest') }}"
  56. l_openshift_image_tag: "{{ openshift_image_tag | default(l_openshift_image_tag_default) | string}}"
  57. # --------------------- #
  58. # systemcontainers_crio #
  59. # --------------------- #
  60. l_insecure_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(l2_docker_insecure_registries)) }}"
  61. l_crio_registries: "{{ l2_docker_additional_registries + ['docker.io'] }}"
  62. l_additional_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(l_crio_registries)) }}"
  63. openshift_crio_image_tag_default: "latest"
  64. l_crt_crio_image_tag_dict:
  65. openshift-enterprise: "{{ l_openshift_image_tag }}"
  66. origin: "{{ openshift_crio_image_tag | default(openshift_crio_image_tag_default) }}"
  67. l_crt_crio_image_prepend_dict:
  68. openshift-enterprise: "registry.access.redhat.com/openshift3"
  69. origin: "docker.io/gscrivano"
  70. l_crt_crio_image_dict:
  71. Fedora:
  72. crio_image_name: "cri-o-fedora"
  73. crio_image_tag: "latest"
  74. CentOS:
  75. crio_image_name: "cri-o-centos"
  76. crio_image_tag: "latest"
  77. RedHat:
  78. crio_image_name: "cri-o"
  79. crio_image_tag: "{{ openshift_crio_image_tag | default(l_crt_crio_image_tag_dict[openshift_deployment_type]) }}"
  80. l_crio_image_prepend: "{{ l_crt_crio_image_prepend_dict[openshift_deployment_type] }}"
  81. l_crio_image_name: "{{ l_crt_crio_image_dict[ansible_distribution]['crio_image_name'] }}"
  82. l_crio_image_tag: "{{ l_crt_crio_image_dict[ansible_distribution] }}"
  83. l_crio_image_default: "{{ l_crio_image_prepend }}/{{ l_crio_image_name }}:{{ l_crio_image_tag }}"
  84. l_crio_image: "{{ openshift_crio_systemcontainer_image_override | default(l_crio_image_default) }}"
  85. # ----------------------- #
  86. # systemcontainers_docker #
  87. # ----------------------- #
  88. l_crt_docker_image_prepend_dict:
  89. Fedora: "registry.fedoraproject.org/latest"
  90. Centos: "docker.io/gscrivano"
  91. RedHat: "registry.access.redhat.com/openshift3"
  92. openshift_docker_image_tag_default: "latest"
  93. l_crt_docker_image_tag_dict:
  94. openshift-enterprise: "{{ l_openshift_image_tag }}"
  95. origin: "{{ openshift_docker_image_tag | default(openshift_docker_image_tag_default) }}"
  96. l_docker_image_prepend: "{{ l_crt_docker_image_prepend_dict[ansible_distribution] }}"
  97. l_docker_image_tag: "{{ l_crt_docker_image_tag_dict[openshift_deployment_type] }}"
  98. l_docker_image_default: "{{ l_docker_image_prepend }}/{{ openshift_docker_service_name }}:{{ l_docker_image_tag }}"
  99. l_docker_image: "{{ openshift_docker_systemcontainer_image_override | default(l_docker_image_default) }}"
  100. l_is_node_system_container: "{{ (openshift_use_node_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"