Ansible v2.4.0.0 on RHEL 6.x
I see How to set linux environment variables with ansible, 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...
- 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') }}
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?