title: Ansible shell not running Helm command
body: <p>Is there a way to add the helm repo using ansible? I'm trying to automate it as part of a playbook that bootstraps a cluster, installs helm, and adds the stable repo. </p>
  
  <p>Everything works fine except the add repo bit.</p>
  
  <p>I have this task in my ansible yaml definition</p>
  
  <pre><code>- name: Add helm stable repo
    shell: helm repo add stable https://kubernetes-charts.storage.googleapis.com
  </code></pre>
  
  <p>But I get the error </p>
  
  <pre><code>"changed": true, "cmd": "helm repo add stable https://kubernetes-charts.storage.googleapis.com/", "/bin/sh: 1: helm: not found" "stderr_lines": ["/bin/sh: 1: helm: not found"]
  </code></pre>
  
  <p>Which is weird cause helm is definitely installed. 
  I can ssh into the box and run </p>
  
  <pre><code>helm version --short
  v3.2.0+ge11b7ce
  </code></pre>
  
  <p>And when I run</p>
  
  <pre><code>helm repo add stable https://kubernetes-charts.storage.googleapis.com/
  </code></pre>
  
  <p>directly, it works. But not via ansible. </p>
  
  <p>Any ideas anyone?</p>