2025-11-12 12:32:43 +01:00

40 lines
1.0 KiB
YAML

#SPDX-License-Identifier: MIT-0
---
# tasks file for k8s-kube-prom-stack
- name: Add helm repository
kubernetes.core.helm_repository:
name: prometheus-community
repo_url: https://prometheus-community.github.io/helm-charts
state: present
- name: Copy value files
ansible.builtin.copy:
src: files/values.yaml
dest: "{{ confdir }}"/prom-values.yaml
- name: Copy wordpress-dashboard
ansible.builtin.copy:
src: files/wordpress-dashboard.yaml
dest: "{{ confdir }}"/
- name: Install kube-prom-stack
kubernetes.core.helm:
name: kube-prom-stack
chart_ref: prometheus-community/kube-prometheus-stack
namespace: observability
create_namespace: true
atomic: true
kubeconfig: /etc/rancher/k3s/k3s.yaml
wait: yes
timeout: 600s
values_files:
"{{ confdir }}"/prom-values.yaml
state: present
- name: Add wordpress-dashboard to grafana
kubernetes.core.k8s:
kubeconfig: /etc/rancher/k3s/k3s.yaml
state: present
src: "{{ confdir }}"/wordpress-dashboard.yaml