main.yml 7.8 KB

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