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.

48 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: install.yml
  7. tags: kubelet
  8. - include: nginx-proxy.yml
  9. when: is_kube_master == false and loadbalancer_apiserver_localhost|default(false)
  10. tags: nginx
  11. - name: Write kubelet config file
  12. template: src=kubelet.j2 dest={{ kube_config_dir }}/kubelet.env backup=yes
  13. notify: restart kubelet
  14. tags: kubelet
  15. - name: write the kubecfg (auth) file for kubelet
  16. template: src=node-kubeconfig.yaml.j2 dest={{ kube_config_dir }}/node-kubeconfig.yaml backup=yes
  17. notify: restart kubelet
  18. tags: kubelet
  19. - name: Ensure nodePort range is reserved
  20. sysctl:
  21. name: net.ipv4.ip_local_reserved_ports
  22. value: "{{ kube_apiserver_node_port_range }}"
  23. sysctl_set: yes
  24. state: present
  25. reload: yes
  26. when: kube_apiserver_node_port_range is defined
  27. tags: kube-proxy
  28. - name: Write proxy manifest
  29. template:
  30. src: manifests/kube-proxy.manifest.j2
  31. dest: "{{ kube_manifest_dir }}/kube-proxy.manifest"
  32. tags: kube-proxy
  33. # reload-systemd
  34. - meta: flush_handlers
  35. - name: Enable kubelet
  36. service:
  37. name: kubelet
  38. enabled: yes
  39. state: started
  40. tags: kubelet