main.yml 7.0 KB

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