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.

47 lines
1.2 KiB

9 years ago
  1. ---
  2. - name: install | Set SSL CA directories
  3. set_fact:
  4. ssl_ca_dirs: "[
  5. {% if ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] -%}
  6. '/usr/share/ca-certificates',
  7. {% elif ansible_os_family == 'RedHat' -%}
  8. '/etc/pki/tls',
  9. '/etc/pki/ca-trust',
  10. {% elif ansible_os_family == 'Debian' -%}
  11. '/usr/share/ca-certificates',
  12. {% endif -%}
  13. ]"
  14. tags:
  15. - facts
  16. - name: Set kubelet deployment to host if kubeadm is enabled
  17. set_fact:
  18. kubelet_deployment_type: host
  19. when: kubeadm_enabled
  20. tags:
  21. - kubeadm
  22. - name: install | Copy kubeadm binary from download dir
  23. command: rsync -piu "{{ local_release_dir }}/kubeadm" "{{ bin_dir }}/kubeadm"
  24. changed_when: false
  25. when: kubeadm_enabled
  26. tags:
  27. - kubeadm
  28. - name: install | Set kubeadm binary permissions
  29. file:
  30. path: "{{ bin_dir }}/kubeadm"
  31. mode: "0755"
  32. state: file
  33. when: kubeadm_enabled
  34. tags:
  35. - kubeadm
  36. - include_tasks: "install_{{ kubelet_deployment_type }}.yml"
  37. - name: install | Write kubelet systemd init file
  38. template:
  39. src: "kubelet.{{ kubelet_deployment_type }}.service.j2"
  40. dest: "/etc/systemd/system/kubelet.service"
  41. backup: "yes"
  42. notify: restart kubelet