title: How to set existing linux environment variables with ansible?
body: <p>Ansible v2.4.0.0 on RHEL 6.x</p>
  
  <p>I see <a href="https://stackoverflow.com/questions/27733511/how-to-set-linux-environment-variables-with-ansible">How to set linux environment variables with ansible</a>, but it deals with setting a NEW environment variable. The solution does NOT work for me if I try to set my PATH variable. I do...</p>
  
  <pre><code>- name: Add /usr/other/bin to PATH dir to use the git binary there
    environment:
  #    PATH: /usr/other/bin:{{ ansible_env.PATH }}
      PATH: /usr/other/bin:{{ lookup('env','PATH') }}
  </code></pre>
  
  <p>I've tried both ways, shown above, commenting out one vs. the other, and I get syntax errors in both cases. What am I missing?</p>