You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.3 KiB

9 years ago
  1. ---
  2. - set_fact:
  3. standalone_kubelet: >-
  4. {%- if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] -%}true{%- else -%}false{%- endif -%}
  5. tags: facts
  6. - include: pre_upgrade.yml
  7. tags: kubelet
  8. - include: install.yml
  9. tags: kubelet
  10. - include: nginx-proxy.yml
  11. when: is_kube_master == false and loadbalancer_apiserver_localhost|default(true)
  12. tags: nginx
  13. - name: Write kubelet config file
  14. template:
  15. src: kubelet.j2
  16. dest: "{{ kube_config_dir }}/kubelet.env"
  17. backup: yes
  18. notify: restart kubelet
  19. tags: kubelet
  20. - name: write the kubecfg (auth) file for kubelet
  21. template:
  22. src: node-kubeconfig.yaml.j2
  23. dest: "{{ kube_config_dir }}/node-kubeconfig.yaml"
  24. backup: yes
  25. notify: restart kubelet
  26. tags: kubelet
  27. - name: Ensure nodePort range is reserved
  28. sysctl:
  29. name: net.ipv4.ip_local_reserved_ports
  30. value: "{{ kube_apiserver_node_port_range }}"
  31. sysctl_set: yes
  32. state: present
  33. reload: yes
  34. when: kube_apiserver_node_port_range is defined
  35. tags: kube-proxy
  36. - name: Write proxy manifest
  37. template:
  38. src: manifests/kube-proxy.manifest.j2
  39. dest: "{{ kube_manifest_dir }}/kube-proxy.manifest"
  40. tags: kube-proxy
  41. # reload-systemd
  42. - meta: flush_handlers
  43. - name: Enable kubelet
  44. service:
  45. name: kubelet
  46. enabled: yes
  47. state: started
  48. tags: kubelet