40 lines
1.0 KiB
YAML
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: /root/prom-values.yaml
|
|
|
|
- name: Copy wordpress-dashboard
|
|
ansible.builtin.copy:
|
|
src: files/wordpress-dashboard.yaml
|
|
dest: /root/
|
|
|
|
- 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:
|
|
/root/prom-values.yaml # Path to your custom values file, if needed
|
|
state: present
|
|
|
|
- name: Add wordpress-dashboard to grafana
|
|
kubernetes.core.k8s:
|
|
kubeconfig: /etc/rancher/k3s/k3s.yaml
|
|
state: present
|
|
src: /root/wordpress-dashboard.yaml
|