main.yml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. l_openshift_images_dict:
  9. origin: 'docker.io/openshift/origin-${component}:${version}'
  10. openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
  11. l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
  12. l_os_registry_url: "{{ oreg_url_master | default(oreg_url) | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
  13. osm_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'control-plane') }}"
  14. system_images_registry_dict:
  15. openshift-enterprise: "registry.access.redhat.com"
  16. origin: "docker.io"
  17. system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
  18. l_osm_id_providers_dict:
  19. openshift-enterprise:
  20. - name: 'deny_all'
  21. challenge: True
  22. login: True
  23. kind: 'DenyAllPasswordIdentityProvider'
  24. origin:
  25. - name: 'allow_all'
  26. challenge: True
  27. login: True
  28. kind: 'AllowAllPasswordIdentityProvider'
  29. openshift_master_identity_providers: "{{ l_osm_id_providers_dict[openshift_deployment_type] }}"
  30. l_osm_disabled_features: "{{ openshift_deployment_subtype == 'registry' | bool }}"
  31. l_osm_disabled_features_list:
  32. - Builder
  33. - S2IBuilder
  34. - WebConsole
  35. openshift_master_dns_port: 8053
  36. osm_project_request_template: ''
  37. osm_mcs_allocator_range: 's0:/2'
  38. osm_mcs_labels_per_project: 5
  39. osm_uid_allocator_range: '1000000000-1999999999/10000'
  40. osm_project_request_message: ''
  41. openshift_node_ips: []
  42. r_openshift_master_clean_install: false
  43. r_openshift_master_os_firewall_enable: true
  44. r_openshift_master_os_firewall_deny: []
  45. default_r_openshift_master_os_firewall_allow:
  46. - service: api server https
  47. port: "{{ openshift_master_api_port }}/tcp"
  48. - service: api controllers https
  49. port: "{{ openshift.master.controllers_port }}/tcp"
  50. - service: skydns tcp
  51. port: "{{ openshift_master_dns_port }}/tcp"
  52. - service: skydns udp
  53. port: "{{ openshift_master_dns_port }}/udp"
  54. r_openshift_master_os_firewall_allow: "{{ default_r_openshift_master_os_firewall_allow | union(openshift_master_open_ports | default([])) }}"
  55. # oreg_url is defined by user input
  56. oreg_host: "{{ oreg_url.split('/')[0] if (oreg_url is defined and '.' in oreg_url.split('/')[0]) else '' }}"
  57. oreg_auth_credentials_path: "{{ r_openshift_master_data_dir }}/.docker"
  58. oreg_auth_credentials_replace: False
  59. l_bind_docker_reg_auth: False
  60. openshift_docker_alternative_creds: "{{ (openshift_docker_use_system_container | default(False) | bool) or (openshift_use_crio_only | default(False)) }}"
  61. containerized_svc_dir: "/usr/lib/systemd/system"
  62. ha_svc_template_path: "native-cluster"
  63. openshift_docker_service_name: "{{ 'container-engine' if (openshift_docker_use_system_container | default(False) | bool) else 'docker' }}"
  64. openshift_master_loopback_config: "{{ openshift_master_config_dir }}/openshift-master.kubeconfig"
  65. loopback_context_string: "current-context: {{ openshift.master.loopback_context_name }}"
  66. openshift_master_session_secrets_file: "{{ openshift_master_config_dir }}/session-secrets.yaml"
  67. openshift_master_policy: "{{ openshift_master_config_dir }}/policy.json"
  68. scheduler_config:
  69. kind: Policy
  70. apiVersion: v1
  71. predicates: "{{ openshift_master_scheduler_predicates
  72. | default(openshift_master_scheduler_current_predicates
  73. | default(openshift_master_scheduler_default_predicates)) }}"
  74. priorities: "{{ openshift_master_scheduler_priorities
  75. | default(openshift_master_scheduler_current_priorities
  76. | default(openshift_master_scheduler_default_priorities)) }}"
  77. openshift_master_valid_grant_methods:
  78. - auto
  79. - prompt
  80. - deny
  81. openshift_master_is_scaleup_host: False
  82. # openshift_master_oauth_template is deprecated. Should be added to deprecations
  83. # and removed.
  84. openshift_master_oauth_template: False
  85. openshift_master_oauth_templates_default:
  86. login: "{{ openshift_master_oauth_template }}"
  87. openshift_master_oauth_templates: "{{ openshift_master_oauth_template | ternary(openshift_master_oauth_templates_default, False) }}"
  88. # Here we combine openshift_master_oath_template into 'login' key of openshift_master_oath_templates, if not present.
  89. l_openshift_master_oauth_templates: "{{ openshift_master_oauth_templates | default(openshift_master_oauth_templates_default) }}"
  90. # NOTE
  91. # r_openshift_master_*_default may be defined external to this role.
  92. # openshift_use_*, if defined, may affect other roles or play behavior.
  93. r_openshift_master_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
  94. r_openshift_master_use_openshift_sdn: "{{ r_openshift_master_use_openshift_sdn_default }}"
  95. r_openshift_master_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
  96. r_openshift_master_use_nuage: "{{ r_openshift_master_use_nuage_default }}"
  97. r_openshift_master_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
  98. r_openshift_master_use_contiv: "{{ r_openshift_master_use_contiv_default }}"
  99. r_openshift_master_use_kuryr_default: "{{ openshift_use_kuryr | default(False) }}"
  100. r_openshift_master_use_kuryr: "{{ r_openshift_master_use_kuryr_default }}"
  101. r_openshift_master_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
  102. r_openshift_master_data_dir: "{{ r_openshift_master_data_dir_default }}"
  103. r_openshift_master_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
  104. r_openshift_master_sdn_network_plugin_name: "{{ r_openshift_master_sdn_network_plugin_name_default }}"
  105. openshift_master_use_persistentlocalvolumes: "{{ openshift_persistentlocalstorage_enabled | default(False) }}"
  106. openshift_master_image_config_latest_default: "{{ openshift_image_config_latest | default(False) }}"
  107. openshift_master_image_config_latest: "{{ openshift_master_image_config_latest_default }}"
  108. openshift_master_config_dir_default: "{{ openshift.common.config_base ~ '/master' if openshift is defined and 'common' in openshift else '/etc/origin/master' }}"
  109. openshift_master_config_dir: "{{ openshift_master_config_dir_default }}"
  110. openshift_master_csr_sa: node-bootstrapper
  111. openshift_master_csr_namespace: openshift-infra
  112. openshift_master_config_file: "{{ openshift_master_config_dir }}/master-config.yaml"
  113. openshift_master_scheduler_conf: "{{ openshift_master_config_dir }}/scheduler.json"
  114. l_osm_sess_auth_def: "{{ hostvars[groups.oo_first_master.0]['l_osm_session_auth_secrets'] }}"
  115. l_osm_session_auth_secrets: "{{ openshift_master_session_auth_secrets | default(l_osm_sess_auth_def) }}"
  116. l_osm_sess_encrypt_def: "{{ hostvars[groups.oo_first_master.0]['l_osm_session_encryption_secrets'] }}"
  117. l_osm_session_encryption_secrets: "{{ openshift_master_session_encryption_secrets | default(l_osm_sess_encrypt_def) }}"
  118. openshift_master_access_token_max_seconds: 86400
  119. openshift_master_auth_token_max_seconds: 500
  120. # oo_htpasswd_users_from_file is a custom filter in role lib_utils
  121. l_osm_htpasswd_users_none: {}
  122. openshift_master_htpasswd_users: "{{ lookup('file', openshift_master_htpasswd_file) | oo_htpasswd_users_from_file if openshift_master_htpasswd_file is defined else l_osm_htpasswd_users_none }}"
  123. openshift_master_manage_htpasswd: True
  124. l_osm_request_header_none: {}
  125. openshift_master_request_header_ca: "{{ lookup('file', openshift_master_request_header_ca_file) if openshift_master_request_header_ca_file is defined else l_osm_request_header_none }}"
  126. openshift_master_oauth_grant_method: auto
  127. openshift_master_dynamic_provisioning_enabled: True
  128. openshift_master_max_requests_inflight: 500
  129. openshift_master_embedded_dns: True
  130. openshift_master_embedded_kube: True
  131. openshift_master_pod_eviction_timeout: ""