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.

34 lines
1.0 KiB

  1. ---
  2. - name: Kata Containers | Create addon dir
  3. file:
  4. path: "{{ kube_config_dir }}/addons/kata_containers"
  5. owner: root
  6. group: root
  7. mode: 0755
  8. recurse: true
  9. - name: Kata Containers | Templates list
  10. set_fact:
  11. kata_containers_templates:
  12. - { name: runtimeclass-kata-qemu, file: runtimeclass-kata-qemu.yml, type: runtimeclass }
  13. - name: Kata Containers | Create manifests
  14. template:
  15. src: "{{ item.file }}.j2"
  16. dest: "{{ kube_config_dir }}/addons/kata_containers/{{ item.file }}"
  17. with_items: "{{ kata_containers_templates }}"
  18. register: kata_containers_manifests
  19. when:
  20. - inventory_hostname == groups['kube-master'][0]
  21. - name: Kata Containers | Apply manifests
  22. kube:
  23. name: "{{ item.item.name }}"
  24. kubectl: "{{ bin_dir }}/kubectl"
  25. resource: "{{ item.item.type }}"
  26. filename: "{{ kube_config_dir }}/addons/kata_containers/{{ item.item.file }}"
  27. state: "latest"
  28. with_items: "{{ kata_containers_manifests.results }}"
  29. when:
  30. - inventory_hostname == groups['kube-master'][0]