<p>I am trying to install Helm charts from local path via ansible using the following module:</p>
<pre><code>- name: Deploy Elasticsearch chart from local path
    community.kubernetes.helm:
      name: es
      chart_ref: ./elasticsearch
      kubeconfig_path: ./kubeconfig
      release_namespace: elasticsearch
      create_namespace: true
</code></pre>
<p>The chart is present in the directory <code>./elasticsearch</code> and this method by default refers to the values.yaml. But I want the chart to refer to a file that was created with custom values (custom-values.yaml). How do I force the helm module in ansible to use the <code>custom-values.yaml</code> file?</p>

veeresh
<p>According to the documentation <a href="https://docs.ansible.com/ansible/latest/collections/community/kubernetes/helm_module.html" rel="nofollow noreferrer">here</a> you are looking for the 'values_files' parameter.</p>
<pre><code>- name: Deploy Elasticsearch chart from local path
    community.kubernetes.helm:
      name: es
      chart_ref: ./elasticsearch
      kubeconfig_path: ./kubeconfig
      release_namespace: elasticsearch
      create_namespace: true
      values_files:
      - /custom-values.yaml
</code></pre>
<p>should do the trick for you</p>
