main.yml 8.2 KB

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