main.yml 7.0 KB

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