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.

31 lines
918 B

  1. ---
  2. - name: Kubernetes Apps | Delete old kubernetes-dashboard resources
  3. kube:
  4. name: "kubernetes-dashboard"
  5. kubectl: "{{bin_dir}}/kubectl"
  6. resource: "{{ item }}"
  7. state: absent
  8. with_items:
  9. - 'ClusterRoleBinding'
  10. tags:
  11. - upgrade
  12. - name: Kubernetes Apps | Lay down dashboard template
  13. template:
  14. src: "{{item.file}}"
  15. dest: "{{kube_config_dir}}/{{item.file}}"
  16. with_items:
  17. - {file: dashboard.yml.j2, type: deploy, name: kubernetes-dashboard}
  18. register: manifests
  19. when: inventory_hostname == groups['kube-master'][0]
  20. - name: Kubernetes Apps | Start dashboard
  21. kube:
  22. name: "{{item.item.name}}"
  23. namespace: "{{system_namespace}}"
  24. kubectl: "{{bin_dir}}/kubectl"
  25. resource: "{{item.item.type}}"
  26. filename: "{{kube_config_dir}}/{{item.item.file}}"
  27. state: "latest"
  28. with_items: "{{ manifests.results }}"
  29. when: inventory_hostname == groups['kube-master'][0]