main.yml 7.1 KB

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