main.yml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. ---
  2. openshift_client_binary: "{{ (openshift_is_atomic | bool) | ternary('/usr/local/bin/oc', 'oc') }}"
  3. system_images_registry_dict:
  4. openshift-enterprise: "registry.redhat.io"
  5. origin: "docker.io"
  6. system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
  7. l_openshift_images_dict:
  8. origin: 'docker.io/openshift/origin-${component}:${version}'
  9. openshift-enterprise: 'registry.redhat.io/openshift3/ose-${component}:${version}'
  10. l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
  11. l_oreg_host_temp: "{{ oreg_url | default(l_osm_registry_url_default) }}"
  12. # oreg_url is defined by user input.
  13. oreg_host: "{{ l_oreg_host_temp.split('/')[0] }}"
  14. # this variable does not replace ${version} with openshift_image_tag
  15. l_os_non_standard_reg_url: "{{ oreg_url | default(l_osm_registry_url_default) }}"
  16. l_docker_creds_image_dict:
  17. openshift-enterprise: 'openshift3/ose'
  18. origin: 'openshift/origin'
  19. l_docker_creds_image_name: "{{ l_docker_creds_image_dict[openshift_deployment_type] }}"
  20. l_docker_creds_http_proxy: "{{ 'HTTP_PROXY=' ~ openshift.common.http_proxy if openshift.common.http_proxy is defined and openshift.common.http_proxy != '' else ''}}"
  21. l_docker_creds_https_proxy: "{{ 'HTTPS_PROXY=' ~ openshift.common.https_proxy if openshift.common.https_proxy is defined and openshift.common.https_proxy != '' else ''}}"
  22. l_docker_creds_no_proxy: "{{ 'NO_PROXY=' ~ openshift.common.no_proxy if openshift.common.no_proxy is defined and openshift.common.no_proxy != '' else ''}}"
  23. l_docker_creds_proxy_vars: "{{ l_docker_creds_http_proxy }} {{ l_docker_creds_https_proxy }} {{ l_docker_creds_no_proxy }}"
  24. l_osm_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
  25. l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
  26. openshift_image_default: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
  27. # not sure why this one is more complicated than other images
  28. openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary(openshift_image_default, (openshift_image_default.split('/')|length==2) | ternary(system_images_registry + '/' + openshift_image_default, openshift_image_default)) }}"
  29. system_openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + openshift_cli_image, openshift_cli_image) }}"
  30. osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
  31. osm_image: "{{ l_osm_registry_url | regex_replace('${component}' | regex_escape, 'control-plane') }}"
  32. repoquery_cmd: "{{ (ansible_pkg_mgr == 'dnf') | ternary('dnf repoquery --latest-limit 1 -d 0', 'repoquery --plugins') }}"
  33. repoquery_installed: "{{ (ansible_pkg_mgr == 'dnf') | ternary('dnf repoquery --latest-limit 1 -d 0 --disableexcludes=all --installed', 'repoquery --plugins --installed') }}"
  34. openshift_use_crio: False
  35. openshift_use_crio_only: False
  36. openshift_crio_enable_docker_gc: True
  37. openshift_crio_var_sock: "unix:///var/run/crio/crio.sock"
  38. # osm_default_subdomain is an old migrated fact, can probably be removed.
  39. osm_default_subdomain: "router.default.svc.cluster.local"
  40. openshift_master_default_subdomain: "{{ osm_default_subdomain }}"
  41. openshift_portal_net: "{{ openshift_master_portal_net | default(None) }}"
  42. openshift_cluster_network_cidr: "{{ osm_cluster_network_cidr | default('10.128.0.0/14') }}"
  43. openshift_host_subnet_length: "{{ osm_host_subnet_length | default('9') }}"
  44. openshift_hosted_etcd_storage_nfs_directory: '/exports'
  45. openshift_hosted_etcd_storage_nfs_options: '*(rw,root_squash)'
  46. openshift_hosted_etcd_storage_volume_name: 'etcd'
  47. openshift_hosted_etcd_storage_volume_size: '1Gi'
  48. openshift_hosted_etcd_storage_create_pv: True
  49. openshift_hosted_etcd_storage_create_pvc: False
  50. openshift_hosted_etcd_storage_access_modes:
  51. - 'ReadWriteOnce'
  52. openshift_hosted_registry_namespace: 'default'
  53. openshift_hosted_registry_storage_volume_name: 'registry'
  54. openshift_hosted_registry_storage_volume_size: '5Gi'
  55. openshift_hosted_registry_storage_create_pv: True
  56. openshift_hosted_registry_storage_create_pvc: True
  57. openshift_hosted_registry_storage_nfs_directory: '/exports'
  58. openshift_hosted_registry_storage_nfs_options: '*(rw,root_squash)'
  59. openshift_hosted_registry_storage_glusterfs_endpoints: 'glusterfs-registry-endpoints'
  60. openshift_hosted_registry_storage_glusterfs_path: glusterfs-registry-volume
  61. openshift_hosted_registry_storage_glusterfs_readOnly: False
  62. openshift_hosted_registry_storage_glusterfs_swap: False
  63. openshift_hosted_registry_storage_glusterfs_swapcopy: True
  64. openshift_hosted_registry_storage_glusterfs_ips: []
  65. openshift_hosted_registry_storage_hostpath_path: /var/lib/openshift_volumes
  66. # Default to ReadWriteOnce if using hostpath, else default to ReadWriteMany
  67. openshift_hosted_registry_storage_access_modes:
  68. - "{{ (openshift_hosted_registry_storage_kind == 'hostpath') | ternary('ReadWriteOnce', 'ReadWriteMany') }}"
  69. openshift_logging_storage_nfs_directory: '/exports'
  70. openshift_logging_storage_nfs_options: '*(rw,root_squash)'
  71. openshift_logging_storage_volume_name: 'logging-es'
  72. openshift_logging_storage_create_pv: True
  73. openshift_logging_storage_create_pvc: False
  74. openshift_logging_storage_access_modes:
  75. - ['ReadWriteOnce']
  76. openshift_loggingops_storage_volume_name: 'logging-es-ops'
  77. openshift_loggingops_storage_volume_size: '10Gi'
  78. openshift_loggingops_storage_create_pv: True
  79. openshift_loggingops_storage_create_pvc: False
  80. openshift_loggingops_storage_nfs_directory: '/exports'
  81. openshift_loggingops_storage_nfs_options: '*(rw,root_squash)'
  82. openshift_loggingops_storage_access_modes:
  83. - 'ReadWriteOnce'
  84. openshift_metrics_deploy: False
  85. openshift_metrics_duration: 7
  86. openshift_metrics_resolution: '10s'
  87. openshift_metrics_storage_volume_name: 'metrics'
  88. openshift_metrics_storage_volume_size: '10Gi'
  89. openshift_metrics_storage_create_pv: True
  90. openshift_metrics_storage_create_pvc: False
  91. openshift_metrics_storage_nfs_directory: '/exports'
  92. openshift_metrics_storage_nfs_options: '*(rw,root_squash)'
  93. openshift_metrics_storage_access_modes:
  94. - 'ReadWriteOnce'
  95. openshift_prometheus_storage_volume_name: 'prometheus'
  96. openshift_prometheus_storage_volume_size: '10Gi'
  97. openshift_prometheus_storage_access_modes:
  98. - 'ReadWriteOnce'
  99. openshift_prometheus_storage_create_pv: True
  100. openshift_prometheus_storage_create_pvc: False
  101. openshift_prometheus_alertmanager_storage_volume_name: 'prometheus-alertmanager'
  102. openshift_prometheus_alertmanager_storage_volume_size: '10Gi'
  103. openshift_prometheus_alertmanager_storage_access_modes:
  104. - 'ReadWriteOnce'
  105. openshift_prometheus_alertmanager_storage_create_pv: True
  106. openshift_prometheus_alertmanager_storage_create_pvc: False
  107. openshift_prometheus_alertbuffer_storage_volume_name: 'prometheus-alertbuffer'
  108. openshift_prometheus_alertbuffer_storage_volume_size: '10Gi'
  109. openshift_prometheus_alertbuffer_storage_access_modes:
  110. - 'ReadWriteOnce'
  111. openshift_prometheus_alertbuffer_storage_create_pv: True
  112. openshift_prometheus_alertbuffer_storage_create_pvc: False
  113. openshift_service_type_dict:
  114. origin: origin
  115. openshift-enterprise: atomic-openshift
  116. openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"
  117. openshift_master_api_port: "8443"
  118. openshift_ca_host: "{{ groups.oo_first_master.0 }}"
  119. openshift_use_openshift_sdn: true
  120. os_sdn_network_plugin_name: "redhat/openshift-ovs-subnet"
  121. openshift_node_groups:
  122. - name: node-config-master
  123. labels:
  124. - 'node-role.kubernetes.io/master=true'
  125. edits: []
  126. - name: node-config-infra
  127. labels:
  128. - 'node-role.kubernetes.io/infra=true'
  129. edits: []
  130. - name: node-config-compute
  131. labels:
  132. - 'node-role.kubernetes.io/compute=true'
  133. edits: []
  134. - name: node-config-master-infra
  135. labels:
  136. - 'node-role.kubernetes.io/infra=true,node-role.kubernetes.io/master=true'
  137. edits: []
  138. - name: node-config-all-in-one
  139. labels:
  140. - 'node-role.kubernetes.io/infra=true,node-role.kubernetes.io/master=true,node-role.kubernetes.io/compute=true'
  141. edits: []
  142. openshift_master_manage_htpasswd: True