main.yml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. ---
  2. # openshift_master_defaults_in_use is a workaround to detect if we are consuming
  3. # the plays from the role or outside of the role.
  4. openshift_master_defaults_in_use: True
  5. openshift_master_debug_level: "{{ debug_level | default(2) }}"
  6. r_openshift_master_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
  7. r_openshift_master_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
  8. osm_image_default_dict:
  9. origin: 'openshift/origin'
  10. openshift-enterprise: 'openshift3/ose'
  11. osm_image_default: "{{ osm_image_default_dict[openshift_deployment_type] }}"
  12. osm_image: "{{ osm_image_default }}"
  13. l_openshift_master_images_dict:
  14. origin: 'openshift/origin-${component}:${version}'
  15. openshift-enterprise: 'openshift3/ose-${component}:${version}'
  16. l_osm_registry_url_default: "{{ l_openshift_master_images_dict[openshift_deployment_type] }}"
  17. l_osm_registry_url: "{{ oreg_url_master | default(oreg_url) | default(l_osm_registry_url_default) }}"
  18. system_images_registry_dict:
  19. openshift-enterprise: "registry.access.redhat.com"
  20. origin: "docker.io"
  21. system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
  22. l_is_master_system_container: "{{ (openshift_use_master_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
  23. openshift_master_dns_port: 8053
  24. osm_default_node_selector: ''
  25. osm_project_request_template: ''
  26. osm_mcs_allocator_range: 's0:/2'
  27. osm_mcs_labels_per_project: 5
  28. osm_uid_allocator_range: '1000000000-1999999999/10000'
  29. osm_project_request_message: ''
  30. openshift_node_ips: []
  31. r_openshift_master_clean_install: false
  32. r_openshift_master_os_firewall_enable: true
  33. r_openshift_master_os_firewall_deny: []
  34. default_r_openshift_master_os_firewall_allow:
  35. - service: api server https
  36. port: "{{ openshift.master.api_port }}/tcp"
  37. - service: api controllers https
  38. port: "{{ openshift.master.controllers_port }}/tcp"
  39. - service: skydns tcp
  40. port: "{{ openshift_master_dns_port }}/tcp"
  41. - service: skydns udp
  42. port: "{{ openshift_master_dns_port }}/udp"
  43. - service: etcd embedded
  44. port: 4001/tcp
  45. cond: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
  46. r_openshift_master_os_firewall_allow: "{{ default_r_openshift_master_os_firewall_allow | union(openshift_master_open_ports | default([])) }}"
  47. # oreg_url is defined by user input
  48. oreg_host: "{{ oreg_url.split('/')[0] if (oreg_url is defined and '.' in oreg_url.split('/')[0]) else '' }}"
  49. oreg_auth_credentials_path: "{{ r_openshift_master_data_dir }}/.docker"
  50. oreg_auth_credentials_replace: False
  51. l_bind_docker_reg_auth: False
  52. openshift_docker_alternative_creds: "{{ (openshift_docker_use_system_container | default(False) | bool) or (openshift_use_crio_only | default(False)) }}"
  53. containerized_svc_dir: "/usr/lib/systemd/system"
  54. ha_svc_template_path: "native-cluster"
  55. openshift_docker_service_name: "{{ 'container-engine' if (openshift_docker_use_system_container | default(False) | bool) else 'docker' }}"
  56. openshift_master_loopback_config: "{{ openshift_master_config_dir }}/openshift-master.kubeconfig"
  57. loopback_context_string: "current-context: {{ openshift.master.loopback_context_name }}"
  58. openshift_master_session_secrets_file: "{{ openshift_master_config_dir }}/session-secrets.yaml"
  59. openshift_master_policy: "{{ openshift_master_config_dir }}/policy.json"
  60. scheduler_config:
  61. kind: Policy
  62. apiVersion: v1
  63. predicates: "{{ openshift_master_scheduler_predicates
  64. | default(openshift_master_scheduler_current_predicates
  65. | default(openshift_master_scheduler_default_predicates)) }}"
  66. priorities: "{{ openshift_master_scheduler_priorities
  67. | default(openshift_master_scheduler_current_priorities
  68. | default(openshift_master_scheduler_default_priorities)) }}"
  69. openshift_master_valid_grant_methods:
  70. - auto
  71. - prompt
  72. - deny
  73. openshift_master_is_scaleup_host: False
  74. # openshift_master_oauth_template is deprecated. Should be added to deprecations
  75. # and removed.
  76. openshift_master_oauth_template: False
  77. openshift_master_oauth_templates_default:
  78. login: "{{ openshift_master_oauth_template }}"
  79. openshift_master_oauth_templates: "{{ openshift_master_oauth_template | ternary(openshift_master_oauth_templates_default, False) }}"
  80. # Here we combine openshift_master_oath_template into 'login' key of openshift_master_oath_templates, if not present.
  81. l_openshift_master_oauth_templates: "{{ openshift_master_oauth_templates | default(openshift_master_oauth_templates_default) }}"
  82. # These defaults assume forcing journald persistence, fsync to disk once
  83. # a second, rate-limiting to 10,000 logs a second, no forwarding to
  84. # syslog or wall, using 8GB of disk space maximum, using 10MB journal
  85. # files, keeping only a days worth of logs per journal file, and
  86. # retaining journal files no longer than a month.
  87. journald_vars_to_replace:
  88. - { var: Storage, val: persistent }
  89. - { var: Compress, val: yes }
  90. - { var: SyncIntervalSec, val: 1s }
  91. - { var: RateLimitInterval, val: 1s }
  92. - { var: RateLimitBurst, val: 10000 }
  93. - { var: SystemMaxUse, val: 8G }
  94. - { var: SystemKeepFree, val: 20% }
  95. - { var: SystemMaxFileSize, val: 10M }
  96. - { var: MaxRetentionSec, val: 1month }
  97. - { var: MaxFileSec, val: 1day }
  98. - { var: ForwardToSyslog, val: no }
  99. - { var: ForwardToWall, val: no }
  100. # NOTE
  101. # r_openshift_master_*_default may be defined external to this role.
  102. # openshift_use_*, if defined, may affect other roles or play behavior.
  103. r_openshift_master_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
  104. r_openshift_master_use_openshift_sdn: "{{ r_openshift_master_use_openshift_sdn_default }}"
  105. r_openshift_master_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
  106. r_openshift_master_use_nuage: "{{ r_openshift_master_use_nuage_default }}"
  107. r_openshift_master_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
  108. r_openshift_master_use_contiv: "{{ r_openshift_master_use_contiv_default }}"
  109. r_openshift_master_use_kuryr_default: "{{ openshift_use_kuryr | default(False) }}"
  110. r_openshift_master_use_kuryr: "{{ r_openshift_master_use_kuryr_default }}"
  111. r_openshift_master_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
  112. r_openshift_master_data_dir: "{{ r_openshift_master_data_dir_default }}"
  113. r_openshift_master_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
  114. r_openshift_master_sdn_network_plugin_name: "{{ r_openshift_master_sdn_network_plugin_name_default }}"
  115. openshift_master_image_config_latest_default: "{{ openshift_image_config_latest | default(False) }}"
  116. openshift_master_image_config_latest: "{{ openshift_master_image_config_latest_default }}"
  117. openshift_master_config_dir_default: "{{ openshift.common.config_base ~ '/master' if openshift is defined and 'common' in openshift else '/etc/origin/master' }}"
  118. openshift_master_config_dir: "{{ openshift_master_config_dir_default }}"
  119. openshift_master_bootstrap_enabled: False
  120. openshift_master_csr_sa: node-bootstrapper
  121. openshift_master_csr_namespace: openshift-infra
  122. openshift_master_config_file: "{{ openshift_master_config_dir }}/master-config.yaml"
  123. openshift_master_scheduler_conf: "{{ openshift_master_config_dir }}/scheduler.json"