2017-09-10 04:38:03 +08:00
|
|
|
---
|
2017-11-10 05:59:30 +08:00
|
|
|
- name: Kubernetes Apps | Delete old kubernetes-dashboard resources
|
|
|
|
kube:
|
|
|
|
name: "kubernetes-dashboard"
|
2018-02-05 16:17:51 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
2017-11-10 05:59:30 +08:00
|
|
|
resource: "{{ item }}"
|
|
|
|
state: absent
|
2017-11-14 03:59:31 +08:00
|
|
|
with_items:
|
|
|
|
- 'ClusterRoleBinding'
|
2017-11-10 05:59:30 +08:00
|
|
|
tags:
|
|
|
|
- upgrade
|
|
|
|
|
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 }}"
|
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
|
|
|
|
when: inventory_hostname == groups['kube-master'][0]
|
|
|
|
|
|
|
|
- name: Kubernetes Apps | Start dashboard
|
|
|
|
kube:
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: "kube-system"
|
2018-02-05 16:17:51 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
2019-04-23 14:34:10 +08:00
|
|
|
filename: "{{ manifests.results | selectattr('skipped', 'undefined') | map(attribute='item') | map(attribute='file') | map('regex_replace', '^(.*)$', kube_config_dir+'/\\1') | list }}"
|
2017-09-10 04:38:03 +08:00
|
|
|
state: "latest"
|
|
|
|
when: inventory_hostname == groups['kube-master'][0]
|