summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/kube-prometheus-stack/defaults/main.yml5
-rw-r--r--ansible/roles/kube-prometheus-stack/handlers/main.yml2
-rw-r--r--ansible/roles/kube-prometheus-stack/tasks/main.yml16
-rw-r--r--ansible/roles/kube-prometheus-stack/vars/main.yml2
4 files changed, 19 insertions, 6 deletions
diff --git a/ansible/roles/kube-prometheus-stack/defaults/main.yml b/ansible/roles/kube-prometheus-stack/defaults/main.yml
index ccb68039..e9bcc6aa 100644
--- a/ansible/roles/kube-prometheus-stack/defaults/main.yml
+++ b/ansible/roles/kube-prometheus-stack/defaults/main.yml
@@ -1,2 +1,5 @@
---
-# defaults file for kube-prometheus-stack
+kube_prometheus_stack:
+ k8s_namespace: kube-prometheus
+ helm_release_name: kube-prometheus-stack
+ helm_timeout: "60s"
diff --git a/ansible/roles/kube-prometheus-stack/handlers/main.yml b/ansible/roles/kube-prometheus-stack/handlers/main.yml
deleted file mode 100644
index a201a218..00000000
--- a/ansible/roles/kube-prometheus-stack/handlers/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-# handlers file for kube-prometheus-stack
diff --git a/ansible/roles/kube-prometheus-stack/tasks/main.yml b/ansible/roles/kube-prometheus-stack/tasks/main.yml
index cf52b66f..b7f314e0 100644
--- a/ansible/roles/kube-prometheus-stack/tasks/main.yml
+++ b/ansible/roles/kube-prometheus-stack/tasks/main.yml
@@ -1,2 +1,16 @@
---
-# tasks file for kube-prometheus-stack
+- name: Check {{ kube_prometheus_stack.helm_release_name }} helm package exists
+ stat:
+ path: "{{ app_data_path }}/downloads/kube-prometheus-stack-{{ kube_prometheus_stack_version }}.tgz"
+ register: kube_prometheus_package_stat
+ failed_when: not kube_prometheus_package_stat.stat.exists
+
+- name: "Install Helm release {{ kube_prometheus_stack.helm_release_name }}"
+ community.kubernetes.helm:
+ release_name: "{{ kube_prometheus_stack.helm_release_name }}"
+ release_namespace: "{{ kube_prometheus_stack.k8s_namespace }}"
+ create_namespace: True
+ chart_ref: "{{ app_data_path }}/downloads/kube-prometheus-stack-{{ kube_prometheus_stack_version }}.tgz"
+ wait: True
+ wait_timeout: "{{ kube_prometheus_stack.helm_timeout }}"
+ tags: molecule-notest
diff --git a/ansible/roles/kube-prometheus-stack/vars/main.yml b/ansible/roles/kube-prometheus-stack/vars/main.yml
deleted file mode 100644
index cfc8e1a5..00000000
--- a/ansible/roles/kube-prometheus-stack/vars/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-# vars file for kube-prometheus-stack