---

### tags:
###   prometheus

- name: Deploy kube-prometheus-stack inside monitoring namespace
  become: yes
  kubernetes.core.helm:
    name: "{{ k8s_prometheus_helm__name }}"
    chart_repo_url: "{{ k8s_prometheus_helm__chart_repo_url | default('https://prometheus-community.github.io/helm-charts') }}"
    chart_ref: "{{ k8s_prometheus_helm__chart_ref | default('kube-prometheus-stack') }}"
    release_namespace: "{{ k8s_prometheus_helm__release_namespace }}"
    create_namespace: yes
    release_values: "{{ k8s_prometheus_helm__release_values }}"
  when:
  - inventory_hostname == groups['kube_control_plane'][0]
  tags:
    - prometheus
