main.yml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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_oreg_url_default_dict:
  13. origin: "openshift/origin-${component}:${version}"
  14. openshift-enterprise: "openshift3/ose-${component}:${version}"
  15. openshift_oreg_url_default: "{{ openshift_oreg_url_default_dict[openshift_deployment_type] }}"
  16. oreg_url_node: "{{ oreg_url | default(openshift_oreg_url_default) }}"
  17. osn_ovs_image_default_dict:
  18. origin: "openshift/openvswitch"
  19. openshift-enterprise: "openshift3/openvswitch"
  20. osn_ovs_image_default: "{{ osn_ovs_image_default_dict[openshift_deployment_type] }}"
  21. osn_ovs_image: "{{ osn_ovs_image_default }}"
  22. openshift_dns_ip: "{{ ansible_default_ipv4['address'] }}"
  23. openshift_node_env_vars: {}
  24. # Create list of 'k=v' pairs.
  25. l_node_kubelet_node_labels: "{{ openshift_node_labels | default({}) | lib_utils_oo_dict_to_keqv_list }}"
  26. openshift_node_kubelet_args_dict:
  27. aws:
  28. cloud-provider:
  29. - aws
  30. cloud-config:
  31. - "{{ openshift_config_base ~ '/cloudprovider/aws.conf' }}"
  32. node-labels: "{{ l_node_kubelet_node_labels }}"
  33. openstack:
  34. cloud-provider:
  35. - openstack
  36. cloud-config:
  37. - "{{ openshift_config_base ~ '/cloudprovider/openstack.conf' }}"
  38. node-labels: "{{ l_node_kubelet_node_labels }}"
  39. gce:
  40. cloud-provider:
  41. - gce
  42. cloud-config:
  43. - "{{ openshift_config_base ~ '/cloudprovider/gce.conf' }}"
  44. node-labels: "{{ l_node_kubelet_node_labels }}"
  45. azure:
  46. cloud-provider:
  47. - azure
  48. cloud-config:
  49. - "{{ openshift_config_base ~ '/cloudprovider/azure.conf' }}"
  50. node-labels: "{{ l_node_kubelet_node_labels }}"
  51. undefined:
  52. node-labels: "{{ l_node_kubelet_node_labels }}"
  53. l_node_kubelet_args_default: "{{ openshift_node_kubelet_args_dict[openshift_cloudprovider_kind | default('undefined')] }}"
  54. l_openshift_node_kubelet_args: "{{ openshift_node_kubelet_args | default({}) }}"
  55. # Combine the default kubelet_args dictionary (based on cloud provider, if provided)
  56. # with user-supplied openshift_node_kubelet_args.
  57. # openshift_node_kubelet_args will override the defaults, if keys and/or subkeys
  58. # are present in both.
  59. l2_openshift_node_kubelet_args: "{{ l_node_kubelet_args_default | combine(l_openshift_node_kubelet_args, recursive=True) }}"
  60. openshift_node_dnsmasq_install_network_manager_hook: true
  61. # lo must always be present in this list or dnsmasq will conflict with
  62. # the node's dns service.
  63. openshift_node_dnsmasq_except_interfaces:
  64. - lo
  65. r_openshift_node_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
  66. r_openshift_node_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
  67. l_is_node_system_container: "{{ (openshift_use_node_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
  68. openshift_node_syscon_auth_mounts_l:
  69. - type: bind
  70. source: "{{ oreg_auth_credentials_path }}"
  71. destination: "/root/.docker"
  72. options:
  73. - ro
  74. - bind
  75. # If we need to add new mounts in the future, or the user wants to mount data.
  76. # This should be in the same format as auth_mounts_l above.
  77. openshift_node_syscon_add_mounts_l: []
  78. openshift_deployment_type: "{{ openshift_deployment_type | default('origin') }}"
  79. openshift_node_image_dict:
  80. origin: 'openshift/node'
  81. openshift-enterprise: 'openshift3/node'
  82. osn_image: "{{ openshift_node_image_dict[openshift_deployment_type] }}"
  83. openshift_service_type_dict:
  84. origin: origin
  85. openshift-enterprise: atomic-openshift
  86. openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"
  87. system_images_registry_dict:
  88. openshift-enterprise: "registry.access.redhat.com"
  89. origin: "docker.io"
  90. system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
  91. l_is_openvswitch_system_container: "{{ (openshift_use_openvswitch_system_container | default(openshift_use_system_containers | default(false)) | bool) }}"
  92. openshift_image_tag: ''
  93. default_r_openshift_node_image_prep_packages:
  94. - "{{ openshift_service_type }}-master"
  95. - "{{ openshift_service_type }}-node"
  96. - "{{ openshift_service_type }}-docker-excluder"
  97. - "{{ openshift_service_type }}-sdn-ovs"
  98. - ansible
  99. - openvswitch
  100. - docker
  101. - etcd
  102. - haproxy
  103. - dnsmasq
  104. - ntp
  105. - logrotate
  106. - httpd-tools
  107. - bind
  108. - firewalld
  109. - libselinux-python
  110. - conntrack-tools
  111. - openssl
  112. - cloud-init
  113. - iproute
  114. - python-dbus
  115. - PyYAML
  116. - yum-utils
  117. # gluster
  118. - glusterfs-fuse
  119. - device-mapper-multipath
  120. # nfs
  121. - nfs-utils
  122. - flannel
  123. - bash-completion
  124. # cockpit
  125. - cockpit-ws
  126. - cockpit-system
  127. - cockpit-bridge
  128. - cockpit-docker
  129. # iscsi
  130. - iscsi-initiator-utils
  131. # ceph
  132. - ceph-common
  133. # systemcontainer
  134. # - runc
  135. # - container-selinux
  136. # - atomic
  137. #
  138. r_openshift_node_image_prep_packages: "{{ default_r_openshift_node_image_prep_packages | union(openshift_node_image_prep_packages | default([])) }}"
  139. openshift_node_bootstrap: False
  140. r_openshift_node_os_firewall_deny: []
  141. default_r_openshift_node_os_firewall_allow:
  142. - service: Kubernetes kubelet
  143. port: 10250/tcp
  144. - service: http
  145. port: 80/tcp
  146. - service: https
  147. port: 443/tcp
  148. - service: OpenShift OVS sdn
  149. port: 4789/udp
  150. cond: openshift_use_openshift_sdn | bool
  151. - service: Calico BGP Port
  152. port: 179/tcp
  153. cond: "{{ openshift_node_use_calico }}"
  154. - service: Kubernetes service NodePort TCP
  155. port: "{{ openshift_node_port_range | default('') }}/tcp"
  156. cond: "{{ openshift_node_port_range is defined }}"
  157. - service: Kubernetes service NodePort UDP
  158. port: "{{ openshift_node_port_range | default('') }}/udp"
  159. cond: "{{ openshift_node_port_range is defined }}"
  160. # Allow multiple port ranges to be added to the role
  161. r_openshift_node_os_firewall_allow: "{{ default_r_openshift_node_os_firewall_allow | union(openshift_node_open_ports | default([])) }}"
  162. # oreg_url is defined by user input
  163. oreg_host: "{{ oreg_url.split('/')[0] if (oreg_url is defined and '.' in oreg_url.split('/')[0]) else '' }}"
  164. oreg_auth_credentials_path: "{{ openshift_node_data_dir }}/.docker"
  165. oreg_auth_credentials_replace: False
  166. l_bind_docker_reg_auth: False
  167. openshift_use_crio: False
  168. openshift_docker_alternative_creds: "{{ (openshift_docker_use_system_container | default(False) | bool) or (openshift_use_crio_only | default(False) | bool) }}"
  169. openshift_docker_service_name: "{{ 'container-engine' if (openshift_docker_use_system_container | default(False) | bool) else 'docker' }}"
  170. # NOTE
  171. # r_openshift_node_*_default may be defined external to this role.
  172. # openshift_use_*, if defined, may affect other roles or play behavior.
  173. openshift_node_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
  174. openshift_node_use_openshift_sdn: "{{ openshift_node_use_openshift_sdn_default }}"
  175. openshift_node_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
  176. openshift_node_sdn_network_plugin_name: "{{ openshift_node_sdn_network_plugin_name_default }}"
  177. openshift_node_use_calico_default: "{{ openshift_use_calico | default(False) }}"
  178. openshift_node_use_calico: "{{ openshift_node_use_calico_default }}"
  179. openshift_node_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
  180. openshift_node_use_nuage: "{{ openshift_node_use_nuage_default }}"
  181. openshift_node_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
  182. openshift_node_use_contiv: "{{ openshift_node_use_contiv_default }}"
  183. openshift_node_use_kuryr_default: "{{ openshift_use_kuryr | default(False) }}"
  184. openshift_node_use_kuryr: "{{ openshift_node_use_kuryr_default }}"
  185. openshift_node_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
  186. openshift_node_data_dir: "{{ openshift_node_data_dir_default }}"
  187. openshift_node_config_dir_default: "/etc/origin/node"
  188. openshift_node_config_dir: "{{ openshift_node_config_dir_default }}"
  189. openshift_node_image_config_latest_default: "{{ openshift_image_config_latest | default(False) }}"
  190. openshift_node_image_config_latest: "{{ openshift_node_image_config_latest_default }}"
  191. openshift_node_use_instance_profiles: False