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.1 KiB

  1. ---
  2. - name: Prepare
  3. hosts: all
  4. become: true
  5. roles:
  6. - role: kubespray-defaults
  7. - role: bootstrap-os
  8. - role: adduser
  9. user: "{{ addusers.kube }}"
  10. tasks:
  11. - name: Download CNI
  12. include_tasks: "../../../../download/tasks/download_file.yml"
  13. vars:
  14. download: "{{ download_defaults | combine(downloads.cni) }}"
  15. - name: Prepare container runtime
  16. hosts: all
  17. become: true
  18. vars:
  19. container_manager: containerd
  20. kube_network_plugin: cni
  21. roles:
  22. - role: kubespray-defaults
  23. - role: network_plugin/cni
  24. - role: container-engine/crictl
  25. tasks:
  26. - name: Copy test container files
  27. copy:
  28. src: "{{ item }}"
  29. dest: "/tmp/{{ item }}"
  30. owner: root
  31. mode: "0644"
  32. with_items:
  33. - container.json
  34. - sandbox.json
  35. - name: Create /etc/cni/net.d directory
  36. file:
  37. path: /etc/cni/net.d
  38. state: directory
  39. owner: "{{ kube_owner }}"
  40. mode: "0755"
  41. - name: Setup CNI
  42. copy:
  43. src: "{{ item }}"
  44. dest: "/etc/cni/net.d/{{ item }}"
  45. owner: root
  46. mode: "0644"
  47. with_items:
  48. - 10-mynet.conf