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