2017-09-10 04:38:03 +08:00
|
|
|
---
|
|
|
|
- name: Kubernetes Apps | Lay down dashboard template
|
|
|
|
template:
|
2018-02-05 16:17:51 +08:00
|
|
|
src: "{{ item.file }}.j2"
|
|
|
|
dest: "{{ kube_config_dir }}/{{ item.file }}"
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0644"
|
2017-09-10 04:38:03 +08:00
|
|
|
with_items:
|
2018-02-05 16:17:51 +08:00
|
|
|
- { file: dashboard.yml, type: deploy, name: kubernetes-dashboard }
|
2017-09-10 04:38:03 +08:00
|
|
|
register: manifests
|
2021-03-24 08:26:05 +08:00
|
|
|
when: inventory_hostname == groups['kube_control_plane'][0]
|
2017-09-10 04:38:03 +08:00
|
|
|
|
|
|
|
- name: Kubernetes Apps | Start dashboard
|
|
|
|
kube:
|
2019-04-24 01:37:23 +08:00
|
|
|
name: "{{ item.item.name }}"
|
2020-04-25 18:55:28 +08:00
|
|
|
namespace: "{{ dashboard_namespace }}"
|
2018-02-05 16:17:51 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
2019-04-24 01:37:23 +08:00
|
|
|
resource: "{{ item.item.type }}"
|
|
|
|
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
2017-09-10 04:38:03 +08:00
|
|
|
state: "latest"
|
2019-04-24 01:37:23 +08:00
|
|
|
with_items: "{{ manifests.results }}"
|
2021-03-24 08:26:05 +08:00
|
|
|
when: inventory_hostname == groups['kube_control_plane'][0]
|