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.

49 lines
1.2 KiB

9 years ago
  1. ---
  2. - name: create kubernetes config directory
  3. file: path={{ kube_config_dir }} state=directory
  4. - name: create kubernetes script directory
  5. file: path={{ kube_script_dir }} state=directory
  6. - name: Make sure manifest directory exists
  7. file: path={{ kube_manifest_dir }} state=directory
  8. - name: certs | create system kube-cert groups
  9. group: name={{ kube_cert_group }} state=present system=yes
  10. - name: create system kube user
  11. user:
  12. name=kube
  13. comment="Kubernetes user"
  14. shell=/sbin/nologin
  15. state=present
  16. system=yes
  17. groups={{ kube_cert_group }}
  18. - include: install.yml
  19. - include: secrets.yml
  20. tags:
  21. - secrets
  22. - name: Write kubelet config file
  23. template: src=kubelet.j2 dest={{ kube_config_dir }}/kubelet.conf backup=yes
  24. notify:
  25. - restart kubelet
  26. - name: write the kubecfg (auth) file for kubelet
  27. template: src=node-kubeconfig.yaml.j2 dest={{ kube_config_dir }}/node-kubeconfig.yaml backup=yes
  28. notify:
  29. - restart kubelet
  30. - name: Write proxy manifest
  31. template:
  32. src: manifests/kube-proxy.manifest.j2
  33. dest: "{{ kube_manifest_dir }}/kube-proxy.manifest"
  34. - name: Enable kubelet
  35. service:
  36. name: kubelet
  37. enabled: yes
  38. state: started