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.

45 lines
1.4 KiB

  1. ---
  2. - name: istio | Create addon dir
  3. file:
  4. path: "{{ kube_config_dir }}/addons/istio"
  5. owner: root
  6. group: root
  7. mode: 0755
  8. recurse: yes
  9. - name: istio | Lay out manifests
  10. template:
  11. src: "{{item.file}}.j2"
  12. dest: "{{kube_config_dir}}/addons/istio/{{item.file}}"
  13. with_items:
  14. - {name: istio-mixer, file: istio.yml, type: deployment }
  15. - {name: istio-initializer, file: istio-initializer.yml, type: deployment }
  16. register: manifests
  17. when: inventory_hostname == groups['kube-master'][0]
  18. - name: istio | Copy istioctl binary from download dir
  19. command: rsync -piu "{{ local_release_dir }}/istio/istioctl" "{{ bin_dir }}/istioctl"
  20. changed_when: false
  21. - name: istio | Set up bash completion
  22. shell: "{{ bin_dir }}/istioctl completion >/etc/bash_completion.d/istioctl.sh"
  23. when: ansible_os_family in ["Debian","RedHat"]
  24. - name: istio | Set bash completion file
  25. file:
  26. path: /etc/bash_completion.d/istioctl.sh
  27. owner: root
  28. group: root
  29. mode: 0755
  30. when: ansible_os_family in ["Debian","RedHat"]
  31. - name: istio | apply manifests
  32. kube:
  33. name: "{{item.item.name}}"
  34. namespace: "{{ istio_namespace }}"
  35. kubectl: "{{bin_dir}}/kubectl"
  36. resource: "{{item.item.type}}"
  37. filename: "{{kube_config_dir}}/addons/istio/{{item.item.file}}"
  38. state: "latest"
  39. with_items: "{{ manifests.results }}"
  40. when: inventory_hostname == groups['kube-master'][0]