Anaconda path issue
zonca opened this issue · comments
I am testing on Ubuntu 16.04, I use the ubuntu
as user
and root
as become_user
.
the playbook sets the path to anaconda in /opt/conda/bin
systemwide, in fact when I login either with root
or ubuntu
, it works fine.
However all tasks in the playbook that require anaconda fail. I fixed adding:
environment:
PATH: "/opt/conda/bin:{{ ansible_env.PATH }}"
to all tasks, but there must be a better way.
BTW cannot do at playbook level because ansible_env.PATH
is undefined.
Any suggestion?
I don't know enough about the details of how ansible manages these things, especially wrt to the user and become_user setting. Not surprised that type of thing is needed though. Let us know if you fine a better way.
ok, I am testing a workaround, see:
ok, found the way to set the path just once at playbook level, much cleaner!