---

### tags:
###   ingress-controller

- name: Install ingress via helm
  become: yes
  kubernetes.core.helm:
    create_namespace: yes
    name: "ingress-nginx"
    chart_ref: "ingress-nginx"
    chart_repo_url: "{{ k8s_ingress_helm__chart_repo_url | default('https://kubernetes.github.io/ingress-nginx') }}"
    chart_version: 4.2.5
    release_values: "{{ k8s_ingress_helm__release_values }}"
    release_namespace: "{{ k8s_ingress_helm__release_namespace }}"
  when:
  - inventory_hostname == groups['kube_control_plane'][0]
  tags:
    - ingress-controller
