main.yml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. # osm_default_subdomain is an old migrated fact, can probably be removed.
  38. osm_default_subdomain: "router.default.svc.cluster.local"
  39. openshift_master_default_subdomain: "{{ osm_default_subdomain }}"
  40. openshift_portal_net: "{{ openshift_master_portal_net | default(None) }}"
  41. openshift_cluster_network_cidr: "{{ osm_cluster_network_cidr | default('10.128.0.0/14') }}"
  42. openshift_host_subnet_length: "{{ osm_host_subnet_length | default('9') }}"
  43. openshift_hosted_etcd_storage_nfs_directory: '/exports'
  44. openshift_hosted_etcd_storage_nfs_options: '*(rw,root_squash)'
  45. openshift_hosted_etcd_storage_volume_name: 'etcd'
  46. openshift_hosted_etcd_storage_volume_size: '1Gi'
  47. openshift_hosted_etcd_storage_create_pv: True
  48. openshift_hosted_etcd_storage_create_pvc: False
  49. openshift_hosted_etcd_storage_access_modes:
  50. - 'ReadWriteOnce'
  51. openshift_hosted_registry_namespace: 'default'
  52. openshift_hosted_registry_storage_volume_name: 'registry'
  53. openshift_hosted_registry_storage_volume_size: '5Gi'
  54. openshift_hosted_registry_storage_create_pv: True
  55. openshift_hosted_registry_storage_create_pvc: True
  56. openshift_hosted_registry_storage_nfs_directory: '/exports'
  57. openshift_hosted_registry_storage_nfs_options: '*(rw,root_squash)'
  58. openshift_hosted_registry_storage_glusterfs_endpoints: 'glusterfs-registry-endpoints'
  59. openshift_hosted_registry_storage_glusterfs_path: glusterfs-registry-volume
  60. openshift_hosted_registry_storage_glusterfs_readOnly: False
  61. openshift_hosted_registry_storage_glusterfs_swap: False
  62. openshift_hosted_registry_storage_glusterfs_swapcopy: True
  63. openshift_hosted_registry_storage_glusterfs_ips: []
  64. openshift_hosted_registry_storage_hostpath_path: /var/lib/openshift_volumes
  65. # Default to ReadWriteOnce if using hostpath, else default to ReadWriteMany
  66. openshift_hosted_registry_storage_access_modes:
  67. - "{{ (openshift_hosted_registry_storage_kind == 'hostpath') | ternary('ReadWriteOnce', 'ReadWriteMany') }}"
  68. openshift_logging_storage_nfs_directory: '/exports'
  69. openshift_logging_storage_nfs_options: '*(rw,root_squash)'
  70. openshift_logging_storage_volume_name: 'logging-es'
  71. openshift_logging_storage_create_pv: True
  72. openshift_logging_storage_create_pvc: False
  73. openshift_logging_storage_access_modes:
  74. - ['ReadWriteOnce']
  75. openshift_loggingops_storage_volume_name: 'logging-es-ops'
  76. openshift_loggingops_storage_volume_size: '10Gi'
  77. openshift_loggingops_storage_create_pv: True
  78. openshift_loggingops_storage_create_pvc: False
  79. openshift_loggingops_storage_nfs_directory: '/exports'
  80. openshift_loggingops_storage_nfs_options: '*(rw,root_squash)'
  81. openshift_loggingops_storage_access_modes:
  82. - 'ReadWriteOnce'
  83. openshift_metrics_deploy: False
  84. openshift_metrics_duration: 7
  85. openshift_metrics_resolution: '10s'
  86. openshift_metrics_storage_volume_name: 'metrics'
  87. openshift_metrics_storage_volume_size: '10Gi'
  88. openshift_metrics_storage_create_pv: True
  89. openshift_metrics_storage_create_pvc: False
  90. openshift_metrics_storage_nfs_directory: '/exports'
  91. openshift_metrics_storage_nfs_options: '*(rw,root_squash)'
  92. openshift_metrics_storage_access_modes:
  93. - 'ReadWriteOnce'
  94. openshift_prometheus_storage_volume_name: 'prometheus'
  95. openshift_prometheus_storage_volume_size: '10Gi'
  96. openshift_prometheus_storage_access_modes:
  97. - 'ReadWriteOnce'
  98. openshift_prometheus_storage_create_pv: True
  99. openshift_prometheus_storage_create_pvc: False
  100. openshift_prometheus_alertmanager_storage_volume_name: 'prometheus-alertmanager'
  101. openshift_prometheus_alertmanager_storage_volume_size: '10Gi'
  102. openshift_prometheus_alertmanager_storage_access_modes:
  103. - 'ReadWriteOnce'
  104. openshift_prometheus_alertmanager_storage_create_pv: True
  105. openshift_prometheus_alertmanager_storage_create_pvc: False
  106. openshift_prometheus_alertbuffer_storage_volume_name: 'prometheus-alertbuffer'
  107. openshift_prometheus_alertbuffer_storage_volume_size: '10Gi'
  108. openshift_prometheus_alertbuffer_storage_access_modes:
  109. - 'ReadWriteOnce'
  110. openshift_prometheus_alertbuffer_storage_create_pv: True
  111. openshift_prometheus_alertbuffer_storage_create_pvc: False
  112. openshift_service_type_dict:
  113. origin: origin
  114. openshift-enterprise: atomic-openshift
  115. openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"
  116. openshift_master_api_port: "8443"
  117. openshift_ca_host: "{{ groups.oo_first_master.0 }}"
  118. openshift_use_openshift_sdn: true
  119. os_sdn_network_plugin_name: "redhat/openshift-ovs-subnet"
  120. openshift_node_groups:
  121. - name: node-config-master
  122. labels:
  123. - 'node-role.kubernetes.io/master=true'
  124. edits: []
  125. - name: node-config-infra
  126. labels:
  127. - 'node-role.kubernetes.io/infra=true'
  128. edits: []
  129. - name: node-config-compute
  130. labels:
  131. - 'node-role.kubernetes.io/compute=true'
  132. edits: []
  133. - name: node-config-master-infra
  134. labels:
  135. - 'node-role.kubernetes.io/infra=true,node-role.kubernetes.io/master=true'
  136. edits: []
  137. - name: node-config-all-in-one
  138. labels:
  139. - 'node-role.kubernetes.io/infra=true,node-role.kubernetes.io/master=true,node-role.kubernetes.io/compute=true'
  140. edits: []
  141. openshift_master_manage_htpasswd: True