From 760ca1c3a956fb0033510633c0ea67b8786fcb41 Mon Sep 17 00:00:00 2001 From: Vladimir Vasilkin Date: Thu, 29 Mar 2018 23:03:43 +0300 Subject: [PATCH] adding checking for prometheus_operator_enabled --- roles/kubernetes-apps/metrics/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/kubernetes-apps/metrics/tasks/main.yml b/roles/kubernetes-apps/metrics/tasks/main.yml index bda7d36e6..ee858602b 100644 --- a/roles/kubernetes-apps/metrics/tasks/main.yml +++ b/roles/kubernetes-apps/metrics/tasks/main.yml @@ -2,11 +2,13 @@ - name: Metrics | Make sure Helm is installed command: "{{ bin_dir }}/helm version" when: + - prometheus_operator_enabled - inventory_hostname == groups['kube-master'][0] - name: Metrics | Add coreos repo command: "{{ bin_dir }}/helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/" when: + - prometheus_operator_enabled - inventory_hostname == groups['kube-master'][0] run_once: true @@ -20,6 +22,7 @@ - name: Metrics | Install K8s cluster metrics command: "{{ bin_dir }}/helm upgrade --install kube-prometheus coreos/kube-prometheus --namespace {{ monitoring_namespace }}" when: + - prometheus_operator_enabled - k8s_metrics_enabled - inventory_hostname == groups['kube-master'][0] run_once: true