main.yml 6.8 KB

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