diff --git a/README.md b/README.md index 73bb439..5b40de6 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ TODO. TODO. - kubernetes_enable_web_ui: True + kubernetes_enable_web_ui: False TODO. diff --git a/tasks/main.yml b/tasks/main.yml index 6561c16..62f4d4b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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