main.yml 8.0 KB

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