jupyterhub / jupyterhub-deploy-teaching

Reference deployment of JupyterHub and nbgrader on a single server

Home Page:http://jupyterhub-deploy-teaching.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

ansible/ansible#14959 (comment)

ok, found the way to set the path just once at playbook level, much cleaner!