main.yml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. ---
  2. openshift_node_debug_level: "{{ debug_level | default(2) }}"
  3. openshift_node_iptables_sync_period: '30s'
  4. osn_storage_plugin_deps:
  5. - ceph
  6. - glusterfs
  7. - iscsi
  8. openshift_node_local_quota_per_fsgroup: ""
  9. openshift_node_proxy_mode: iptables
  10. openshift_set_node_ip: False
  11. openshift_config_base: '/etc/origin'
  12. openshift_deployment_type: "{{ openshift_deployment_type | default('origin') }}"
  13. system_images_registry_dict:
  14. openshift-enterprise: "registry.access.redhat.com"
  15. origin: "docker.io"
  16. system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
  17. l_openshift_images_dict:
  18. origin: 'docker.io/openshift/origin-${component}:${version}'
  19. openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
  20. l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
  21. l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
  22. osn_image_default: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
  23. osn_image: "{{ (system_images_registry == 'docker') | ternary(osn_image_default, (osn_image_default.split('/')|length==2) | ternary(system_images_registry + '/' + osn_image_default, osn_image_default)) }}"
  24. system_osn_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + osn_image, osn_image) }}"
  25. openshift_oreg_url_default_dict:
  26. origin: "openshift/origin-${component}:${version}"
  27. openshift-enterprise: "openshift3/ose-${component}:${version}"
  28. openshift_oreg_url_default: "{{ openshift_oreg_url_default_dict[openshift_deployment_type] }}"
  29. oreg_url_node: "{{ oreg_url | default(openshift_oreg_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
  30. openshift_dns_ip: "{{ ansible_default_ipv4['address'] }}"
  31. openshift_node_env_vars: {}
  32. # Create list of 'k=v' pairs.
  33. l_node_kubelet_node_labels: "{{ openshift_node_labels | default({}) | lib_utils_oo_dict_to_keqv_list }}"
  34. openshift_node_kubelet_args_dict:
  35. aws:
  36. cloud-provider:
  37. - aws
  38. cloud-config:
  39. - "{{ openshift_config_base ~ '/cloudprovider/aws.conf' }}"
  40. node-labels: "{{ l_node_kubelet_node_labels }}"
  41. openstack:
  42. cloud-provider:
  43. - openstack
  44. cloud-config:
  45. - "{{ openshift_config_base ~ '/cloudprovider/openstack.conf' }}"
  46. node-labels: "{{ l_node_kubelet_node_labels }}"
  47. gce:
  48. cloud-provider:
  49. - gce
  50. cloud-config:
  51. - "{{ openshift_config_base ~ '/cloudprovider/gce.conf' }}"
  52. node-labels: "{{ l_node_kubelet_node_labels }}"
  53. azure:
  54. cloud-provider:
  55. - azure
  56. cloud-config:
  57. - "{{ openshift_config_base ~ '/cloudprovider/azure.conf' }}"
  58. node-labels: "{{ l_node_kubelet_node_labels }}"
  59. vsphere:
  60. cloud-provider:
  61. - vsphere
  62. cloud-config:
  63. - "{{ openshift_config_base ~ '/cloudprovider/vsphere.conf' }}"
  64. node-labels: "{{ l_node_kubelet_node_labels }}"
  65. undefined:
  66. node-labels: "{{ l_node_kubelet_node_labels }}"
  67. l_node_kubelet_args_default: "{{ openshift_node_kubelet_args_dict[openshift_cloudprovider_kind | default('undefined')] }}"
  68. l_openshift_node_kubelet_args: "{{ openshift_node_kubelet_args | default({}) }}"
  69. # Combine the default kubelet_args dictionary (based on cloud provider, if provided)
  70. # with user-supplied openshift_node_kubelet_args.
  71. # openshift_node_kubelet_args will override the defaults, if keys and/or subkeys
  72. # are present in both.
  73. l2_openshift_node_kubelet_args: "{{ l_node_kubelet_args_default | combine(l_openshift_node_kubelet_args, recursive=True) }}"
  74. openshift_node_dnsmasq_install_network_manager_hook: true
  75. # lo must always be present in this list or dnsmasq will conflict with
  76. # the node's dns service.
  77. openshift_node_dnsmasq_except_interfaces:
  78. - lo
  79. # dnsmasq defaults to neg caching disabled
  80. openshift_node_dnsmasq_no_negcache: true
  81. # When openshift_node_dnsmasq_no_negcache is set to false, how many seconds to cache negative lookups.
  82. openshift_node_dnsmasq_neg_ttl: '1'
  83. r_openshift_node_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
  84. r_openshift_node_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
  85. openshift_node_syscon_auth_mounts_l:
  86. - type: bind
  87. source: "{{ oreg_auth_credentials_path }}"
  88. destination: "/root/.docker"
  89. options:
  90. - ro
  91. - bind
  92. # If we need to add new mounts in the future, or the user wants to mount data.
  93. # This should be in the same format as auth_mounts_l above.
  94. openshift_node_syscon_add_mounts_l: []
  95. openshift_service_type_dict:
  96. origin: origin
  97. openshift-enterprise: atomic-openshift
  98. openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"
  99. default_r_openshift_node_image_prep_packages:
  100. - "{{ openshift_service_type }}-node"
  101. - "{{ openshift_service_type }}-docker-excluder"
  102. - ansible
  103. - bash-completion
  104. - docker
  105. - haproxy
  106. - dnsmasq
  107. - ntp
  108. - logrotate
  109. - httpd-tools
  110. - bind-utils
  111. - firewalld
  112. - libselinux-python
  113. - conntrack-tools
  114. - openssl
  115. - iproute
  116. - python-dbus
  117. - PyYAML
  118. - yum-utils
  119. - glusterfs-fuse
  120. - device-mapper-multipath
  121. - nfs-utils
  122. - cockpit-ws
  123. - cockpit-system
  124. - cockpit-bridge
  125. - cockpit-docker
  126. - iscsi-initiator-utils
  127. - ceph-common
  128. r_openshift_node_image_prep_packages: "{{ default_r_openshift_node_image_prep_packages | union(openshift_node_image_prep_packages | default([])) }}"
  129. r_openshift_node_os_firewall_deny: []
  130. default_r_openshift_node_os_firewall_allow:
  131. - service: Kubernetes kubelet
  132. port: 10250/tcp
  133. - service: http
  134. port: 80/tcp
  135. - service: https
  136. port: 443/tcp
  137. - service: OpenShift OVS sdn
  138. port: 4789/udp
  139. cond: openshift_use_openshift_sdn | bool
  140. - service: Calico BGP Port
  141. port: 179/tcp
  142. cond: "{{ openshift_node_use_calico }}"
  143. - service: Kubernetes service NodePort TCP
  144. port: "{{ openshift_node_port_range | default('') }}/tcp"
  145. cond: "{{ openshift_node_port_range is defined }}"
  146. - service: Kubernetes service NodePort UDP
  147. port: "{{ openshift_node_port_range | default('') }}/udp"
  148. cond: "{{ openshift_node_port_range is defined }}"
  149. # Allow multiple port ranges to be added to the role
  150. r_openshift_node_os_firewall_allow: "{{ default_r_openshift_node_os_firewall_allow | union(openshift_node_open_ports | default([])) }}"
  151. # oreg_url is defined by user input
  152. oreg_host: "{{ oreg_url.split('/')[0] if (oreg_url is defined and '.' in oreg_url.split('/')[0]) else '' }}"
  153. oreg_auth_credentials_path: "{{ openshift_node_data_dir }}/.docker"
  154. oreg_auth_credentials_replace: False
  155. l_bind_docker_reg_auth: False
  156. openshift_use_crio: False
  157. l_crio_var_sock: "/var/run/crio/crio.sock"
  158. openshift_docker_alternative_creds: "{{ openshift_use_crio_only | bool }}"
  159. openshift_docker_service_name: "docker"
  160. # These defaults assume forcing journald persistence, fsync to disk once
  161. # a second, rate-limiting to 10,000 logs a second, no forwarding to
  162. # syslog or wall, using 8GB of disk space maximum, using 10MB journal
  163. # files, keeping only a days worth of logs per journal file, and
  164. # retaining journal files no longer than a month.
  165. journald_vars_to_replace:
  166. - { var: Storage, val: persistent }
  167. - { var: Compress, val: yes }
  168. - { var: SyncIntervalSec, val: 1s }
  169. - { var: RateLimitInterval, val: 1s }
  170. - { var: RateLimitBurst, val: 10000 }
  171. - { var: SystemMaxUse, val: 8G }
  172. - { var: SystemKeepFree, val: 20% }
  173. - { var: SystemMaxFileSize, val: 10M }
  174. - { var: MaxRetentionSec, val: 1month }
  175. - { var: MaxFileSec, val: 1day }
  176. - { var: ForwardToSyslog, val: no }
  177. - { var: ForwardToWall, val: no }
  178. # NOTE
  179. # r_openshift_node_*_default may be defined external to this role.
  180. # openshift_use_*, if defined, may affect other roles or play behavior.
  181. openshift_node_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
  182. openshift_node_use_openshift_sdn: "{{ openshift_node_use_openshift_sdn_default }}"
  183. openshift_node_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
  184. openshift_node_sdn_network_plugin_name: "{{ openshift_node_sdn_network_plugin_name_default }}"
  185. openshift_node_use_calico_default: "{{ openshift_use_calico | default(False) }}"
  186. openshift_node_use_calico: "{{ openshift_node_use_calico_default }}"
  187. openshift_node_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
  188. openshift_node_use_nuage: "{{ openshift_node_use_nuage_default }}"
  189. openshift_node_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
  190. openshift_node_use_contiv: "{{ openshift_node_use_contiv_default }}"
  191. openshift_node_use_kuryr_default: "{{ openshift_use_kuryr | default(False) }}"
  192. openshift_node_use_kuryr: "{{ openshift_node_use_kuryr_default }}"
  193. openshift_node_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
  194. openshift_node_data_dir: "{{ openshift_node_data_dir_default }}"
  195. openshift_node_config_dir_default: "/etc/origin/node"
  196. openshift_node_config_dir: "{{ openshift_node_config_dir_default }}"
  197. openshift_node_image_config_latest_default: "{{ openshift_image_config_latest | default(False) }}"
  198. openshift_node_image_config_latest: "{{ openshift_node_image_config_latest_default }}"
  199. openshift_node_use_instance_profiles: False
  200. openshift_node_use_persistentlocalvolumes: "{{ openshift_persistentlocalstorage_enabled | default(False) | bool }}"