main.yml 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_additional_registries: "{{ l2_docker_additional_registries | to_json }}"
  46. l_docker_blocked_registries: "{{ l2_docker_blocked_registries | to_json }}"
  47. l_docker_insecure_registries: "{{ l2_docker_insecure_registries | to_json }}"
  48. l_docker_selinux_enabled: "{{ openshift_docker_selinux_enabled | to_json }}"
  49. docker_http_proxy: "{{ openshift_http_proxy | default('') }}"
  50. docker_https_proxy: "{{ openshift.common.https_proxy | default('') }}"
  51. docker_no_proxy: "{{ openshift.common.no_proxy | default('') }}"
  52. openshift_use_crio: False
  53. openshift_use_crio_only: False
  54. l_insecure_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(l2_docker_insecure_registries)) }}"
  55. l_crio_registries: "{{ l2_docker_additional_registries + ['docker.io'] }}"
  56. l_additional_crio_registries: "{{ '\"{}\"'.format('\", \"'.join(l_crio_registries)) }}"
  57. l_openshift_image_tag_default: "{{ openshift_release }}"
  58. l_openshift_image_tag: "{{ openshift_image_tag | default(l_openshift_image_tag_default) | string}}"