- name: Create monitoring namespace kubernetes.core.k8s: name: monitoring kind: Namespace state: present - name: Add Prometheus community Helm repository kubernetes.core.helm_repository: name: prometheus-community repo_url: "https://prometheus-community.github.io/helm-charts" - name: Copy Prometheus customization values template: src: values.yml.j2 dest: /tmp/prometheus-values.yml - name: Deploy kube-prometheus-stack via Helm kubernetes.core.helm: name: kube-prometheus-stack chart_ref: prometheus-community/kube-prometheus-stack release_namespace: monitoring values_files: - /tmp/prometheus-values.yml state: present