aboutsummaryrefslogtreecommitdiff
path: root/roles/monitoring/tasks/main.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/monitoring/tasks/main.yaml')
-rw-r--r--roles/monitoring/tasks/main.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/monitoring/tasks/main.yaml b/roles/monitoring/tasks/main.yaml
new file mode 100644
index 0000000..27bec57
--- /dev/null
+++ b/roles/monitoring/tasks/main.yaml
@@ -0,0 +1,17 @@
+---
+- name: Add Prometheus remote chart
+ kubernetes.core.helm_repository:
+ name: prometheus
+ repo_url: https://prometheus-community.github.io/helm-charts
+ delegate_to: localhost
+ run_once: true
+
+- name: Deploy prometheus
+ kubernetes.core.helm:
+ name: prometheus
+ chart_ref: prometheus/prometheus
+ namespace: default
+ state: "{%- if monitoring.enabled -%} present {%- else -%} absent {%- endif -%}"
+ values:
+ delegate_to: localhost
+ run_once: true