Is there a way to do:
export PATH=$PATH:/new/path/to/bin
in Ansible, if possible without using shell or command.
I've tried this
- name: Add another bin dir to system-wide $PATH.
copy:
dest: /etc/profile.d/custom-path.sh
content: 'PATH=$PATH:{{ my_custom_path_var }}'
That I got from: https://www.jeffgeerling.com/comment/reply/2799
But it doesn't work as PATH results in:
\$PATH:/new/path/to/bin
breaking the system's PATH.