2022-11-26 15:19:16 +08:00
|
|
|
- block:
|
|
|
|
- name: prepare some dirs
|
|
|
|
file: name={{ cluster_dir }}/yml/dashboard state=directory
|
2021-09-23 21:36:34 +08:00
|
|
|
|
2022-11-26 15:19:16 +08:00
|
|
|
- name: 准备 dashboard的部署文件
|
|
|
|
template: src=dashboard/{{ item }}.j2 dest={{ cluster_dir }}/yml/dashboard/{{ item }}
|
|
|
|
with_items:
|
|
|
|
- "kubernetes-dashboard.yaml"
|
|
|
|
- "admin-user-sa-rbac.yaml"
|
|
|
|
- "read-user-sa-rbac.yaml"
|
2021-09-23 14:50:29 +08:00
|
|
|
|
2022-11-27 20:42:58 +08:00
|
|
|
- name: 删除 dashboard部署
|
|
|
|
shell: "{{ base_dir }}/bin/kubectl delete -f {{ cluster_dir }}/yml/dashboard/ || echo true; sleep 3"
|
|
|
|
tags: force_change_certs
|
|
|
|
when: 'CHANGE_CA|bool'
|
|
|
|
|
2022-11-26 15:19:16 +08:00
|
|
|
- name: 创建 dashboard部署
|
|
|
|
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/dashboard/"
|
2022-11-27 20:42:58 +08:00
|
|
|
tags: force_change_certs
|
2022-11-26 15:19:16 +08:00
|
|
|
when: 'dashboard_install == "yes"'
|