main.yml 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ---
  2. docker_cli_auth_config_path: '/root/.docker'
  3. openshift_docker_signature_verification: False
  4. openshift_docker_alternative_creds: False
  5. # oreg_url is defined by user input.
  6. oreg_host: "{{ oreg_url.split('/')[0] if (oreg_url is defined and '.' in oreg_url.split('/')[0]) else '' }}"
  7. oreg_auth_credentials_replace: False
  8. openshift_docker_selinux_enabled: True
  9. openshift_docker_service_name: "docker"
  10. openshift_docker_hosted_registry_insecure: False # bool
  11. openshift_docker_hosted_registry_network: "{{ openshift.common.portal_net }}"
  12. openshift_docker_additional_registries: []
  13. openshift_docker_blocked_registries: []
  14. openshift_docker_insecure_registries: []
  15. openshift_docker_ent_reg: 'registry.access.redhat.com'
  16. openshift_docker_options: False # str
  17. openshift_docker_log_driver: False # str
  18. openshift_docker_log_options: []
  19. # The l2_docker_* variables convert csv strings to lists, if
  20. # necessary. These variables should be used in place of their respective
  21. # openshift_docker_* counterparts to ensure the properly formatted lists are
  22. # utilized.
  23. 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 %}"
  24. 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 %}"
  25. 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 %}"
  26. 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 %}"
  27. openshift_docker_use_etc_containers: False
  28. containers_registries_conf_path: /etc/containers/registries.conf
  29. r_crio_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
  30. r_crio_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
  31. r_crio_os_firewall_deny: []
  32. r_crio_os_firewall_allow:
  33. - service: crio
  34. port: 10010/tcp
  35. r_crio_use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(True) }}"
  36. 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 }}"
  37. docker_alt_storage_path: /var/lib/containers/docker
  38. docker_default_storage_path: /var/lib/docker
  39. docker_storage_path: "{{ docker_default_storage_path }}"
  40. docker_storage_size: 40G
  41. docker_storage_setup_options:
  42. vg: docker_vg
  43. data_size: 99%VG
  44. storage_driver: overlay2
  45. root_lv_name: docker-root-lv
  46. root_lv_size: 100%FREE
  47. root_lv_mount_path: "{{ docker_storage_path }}"
  48. docker_storage_extra_options:
  49. - "--storage-opt overlay2.override_kernel_check=true"
  50. - "{{ '--storage-opt overlay2.size=' ~ docker_storage_size if container_runtime_docker_storage_setup_device is defined and container_runtime_docker_storage_setup_device != '' else '' }}"
  51. - "--graph={{ docker_storage_path}}"
  52. # Set local versions of facts that must be in json format for container-daemon.json
  53. # NOTE: When jinja2.9+ is used the container-daemon.json file can move to using tojson
  54. l_docker_log_options: "{{ l2_docker_log_options | to_json }}"
  55. l_docker_log_options_dict: "{{ l2_docker_log_options | lib_utils_oo_list_to_dict | to_json }}"
  56. l_docker_additional_registries: "{{ l2_docker_additional_registries | to_json }}"
  57. l_docker_blocked_registries: "{{ l2_docker_blocked_registries | to_json }}"
  58. l_docker_insecure_registries: "{{ l2_docker_insecure_registries | to_json }}"
  59. l_docker_selinux_enabled: "{{ openshift_docker_selinux_enabled | to_json }}"
  60. docker_http_proxy: "{{ openshift_http_proxy | default('') }}"
  61. docker_https_proxy: "{{ openshift.common.https_proxy | default('') }}"
  62. docker_no_proxy: "{{ openshift.common.no_proxy | default('') }}"
  63. openshift_use_crio: False
  64. l_required_docker_version: '1.13'
  65. l_crio_var_sock: "/var/run/crio/crio.sock"