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.

60 lines
1.3 KiB

9 years ago
  1. ---
  2. - name: Create kubernetes config directory
  3. file:
  4. path: "{{ kube_config_dir }}"
  5. state: directory
  6. owner: kube
  7. - name: Create kubernetes script directory
  8. file:
  9. path: "{{ kube_script_dir }}"
  10. state: directory
  11. owner: kube
  12. - name: Create kubernetes manifests directory
  13. file:
  14. path: "{{ kube_manifest_dir }}"
  15. state: directory
  16. owner: kube
  17. - name: Create kubernetes logs directory
  18. file:
  19. path: "{{ kube_log_dir }}"
  20. state: directory
  21. owner: kube
  22. when: init_system == "sysvinit"
  23. - include: secrets.yml
  24. tags:
  25. - secrets
  26. - include: install.yml
  27. - name: Write kubelet config file
  28. template: src=kubelet.j2 dest={{ kube_config_dir }}/kubelet.env backup=yes
  29. notify:
  30. - restart kubelet
  31. - name: write the kubecfg (auth) file for kubelet
  32. template: src=node-kubeconfig.yaml.j2 dest={{ kube_config_dir }}/node-kubeconfig.yaml backup=yes
  33. notify:
  34. - restart kubelet
  35. - name: Write proxy manifest
  36. template:
  37. src: manifests/kube-proxy.manifest.j2
  38. dest: "{{ kube_manifest_dir }}/kube-proxy.manifest"
  39. - name: Restart kubelet if binary changed
  40. command: /bin/true
  41. notify: restart kubelet
  42. when: kubelet_copy.stdout_lines
  43. # reload-systemd
  44. - meta: flush_handlers
  45. - name: Enable kubelet
  46. service:
  47. name: kubelet
  48. enabled: yes
  49. state: started