mirror of
https://github.com/geerlingguy/ansible-role-kubernetes.git
synced 2024-11-18 19:10:39 +01:00
Fix idempotence for web ui enablement.
This commit is contained in:
parent
751369584d
commit
9d0299daf8
@ -30,7 +30,7 @@ TODO.
|
||||
|
||||
TODO.
|
||||
|
||||
kubernetes_enable_web_ui: True
|
||||
kubernetes_enable_web_ui: False
|
||||
|
||||
TODO.
|
||||
|
||||
|
@ -75,6 +75,14 @@
|
||||
- kubernetes_allow_pods_on_master
|
||||
- kubernetes_init_stat.stat.exists == False
|
||||
|
||||
- name: Check if Kubernetes Dashboard UI service already exists.
|
||||
shell: kubectl get services --namespace kube-system | grep -q kubernetes-dashboard
|
||||
changed_when: False
|
||||
register: kubernetes_dashboard_service
|
||||
when: kubernetes_enable_web_ui
|
||||
|
||||
- name: Enable the Kubernetes Web Dashboard UI (if configured).
|
||||
command: "kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml"
|
||||
when: kubernetes_enable_web_ui
|
||||
when:
|
||||
- kubernetes_enable_web_ui
|
||||
- kubernetes_dashboard_service is failed
|
||||
|
Loading…
Reference in New Issue
Block a user